Compare commits

...

47 Commits

Author SHA1 Message Date
peaceiris
cb23a85c9f chore(release): 2.4.8 2020-03-27 19:13:16 +09:00
peaceiris
b30237c8ce chore(release): Add build assets 2020-03-27 19:13:15 +09:00
Shohei Ueda
4cd0877e87 docs: update notes 2020-03-27 19:12:10 +09:00
Shohei Ueda
b71ad2d014 ci: Add workflow for developing container (#231)
* ci: Add workflow for developing container
* ci: Add CI tasks to Makefile
* chore: Add RUNNER_TEMP to Dockerfile
* deps: Bump git from 2.25.0 to 2.26.0
2020-03-27 19:07:48 +09:00
Shohei Ueda
e470a760d3 deps: node from 12.15.0 to 12.16.1 (#232) 2020-03-27 18:28:53 +09:00
dependabot-preview[bot]
1649bea4d0 deps: bump jest from 25.2.2 to 25.2.3
Bumps [jest](https://github.com/facebook/jest) from 25.2.2 to 25.2.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.2...v25.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 21:04:12 +00:00
dependabot-preview[bot]
a2600d572b deps: bump jest-circus from 25.2.2 to 25.2.3
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 25.2.2 to 25.2.3.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v25.2.3/packages/jest-circus)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 20:41:38 +00:00
dependabot-preview[bot]
1bafab6d5a deps: bump jest-circus from 25.2.1 to 25.2.2
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 25.2.1 to 25.2.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v25.2.2/packages/jest-circus)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 19:06:20 +00:00
dependabot-preview[bot]
601b110315 deps: bump jest from 25.2.1 to 25.2.2
Bumps [jest](https://github.com/facebook/jest) from 25.2.1 to 25.2.2.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.1...v25.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 19:01:00 +00:00
dependabot-preview[bot]
c1f369064c deps: bump jest-circus from 25.2.0 to 25.2.1
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 25.2.0 to 25.2.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v25.2.1/packages/jest-circus)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 09:49:07 +00:00
dependabot-preview[bot]
8cd28fc857 deps: bump jest from 25.2.0 to 25.2.1
Bumps [jest](https://github.com/facebook/jest) from 25.2.0 to 25.2.1.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.2.0...v25.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-26 09:44:36 +00:00
dependabot-preview[bot]
702a3e4c9a deps: bump jest-circus from 25.1.0 to 25.2.0
Bumps [jest-circus](https://github.com/facebook/jest/tree/HEAD/packages/jest-circus) from 25.1.0 to 25.2.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v25.2.0/packages/jest-circus)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-25 18:25:14 +00:00
dependabot-preview[bot]
d7620db17f deps: bump jest from 25.1.0 to 25.2.0
Bumps [jest](https://github.com/facebook/jest) from 25.1.0 to 25.2.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v25.1.0...v25.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-25 18:18:12 +00:00
dependabot-preview[bot]
64135da123 deps: bump @types/node from 12.12.30 to 12.12.31
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.30 to 12.12.31.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-25 08:17:02 +00:00
dependabot-preview[bot]
35eb187a3c deps: bump lint-staged from 10.0.8 to 10.0.9
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.8 to 10.0.9.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.8...v10.0.9)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-24 05:36:34 +00:00
dependabot-preview[bot]
c3a324ff3c deps: bump @zeit/ncc from 0.21.1 to 0.22.0
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.21.1 to 0.22.0.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.21.1...0.22.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-24 03:17:30 +00:00
dependabot-preview[bot]
9b11300647 deps: bump prettier from 2.0.1 to 2.0.2
Bumps [prettier](https://github.com/prettier/prettier) from 2.0.1 to 2.0.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.0.1...2.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-24 03:11:50 +00:00
dependabot-preview[bot]
6bed4121ee deps: bump @typescript-eslint/parser from 2.24.0 to 2.25.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.25.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-23 19:34:49 +00:00
dependabot-preview[bot]
b9b88c049f deps: bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.25.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.25.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-23 19:27:31 +00:00
dependabot-preview[bot]
da65b73f4d deps: bump prettier from 1.19.1 to 2.0.1
Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.0.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-22 06:56:13 +00:00
Shohei Ueda
33d3f73fc7 docs: bump actions/checkout to v2 2020-03-21 12:49:54 +09:00
dependabot-preview[bot]
a3f7ea4140 deps: bump nock from 12.0.2 to 12.0.3
Bumps [nock](https://github.com/nock/nock) from 12.0.2 to 12.0.3.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.2...v12.0.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-17 12:34:11 +00:00
Shohei Ueda
61937d118f ci: set update_schedule live 2020-03-17 18:53:37 +09:00
dependabot-preview[bot]
88076695a9 deps: bump @typescript-eslint/parser from 2.23.0 to 2.24.0 (#213)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.23.0 to 2.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.24.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-17 11:24:00 +09:00
dependabot-preview[bot]
2935a38e76 deps: bump @typescript-eslint/eslint-plugin from 2.23.0 to 2.24.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.23.0 to 2.24.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.24.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-17 02:19:39 +00:00
Shohei Ueda
c69c549ff8 docs: Add codeclimate badge 2020-03-16 10:49:39 +09:00
peaceiris
9cdeeef2f3 chore(release): Remove build assets [skip ci] 2020-03-14 06:34:43 +09:00
peaceiris
7c9a227529 chore(release): 2.4.7 2020-03-14 06:34:42 +09:00
peaceiris
514a588dc1 chore(release): Add build assets 2020-03-14 06:34:41 +09:00
dependabot-preview[bot]
ea7a8f0343 deps: [security] bump acorn from 6.4.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-13 21:30:04 +00:00
dependabot-preview[bot]
de4f7b1136 deps: bump @types/node from 12.12.29 to 12.12.30
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.29 to 12.12.30.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-13 19:13:06 +00:00
dependabot-preview[bot]
0d2e11837b deps: bump @actions/tool-cache from 1.3.2 to 1.3.3
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 08:29:57 +00:00
dependabot-preview[bot]
703c21fa41 deps: bump @typescript-eslint/parser from 2.22.0 to 2.23.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.23.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 08:10:51 +00:00
dependabot-preview[bot]
844e33d410 deps: bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.23.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.22.0 to 2.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.23.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 07:31:37 +00:00
Shohei Ueda
3d71d2403d ci: update script link [skip ci] 2020-03-09 20:23:44 +09:00
dependabot-preview[bot]
c6512d44a3 deps: bump @actions/tool-cache from 1.3.1 to 1.3.2
Bumps [@actions/tool-cache](https://github.com/actions/toolkit/tree/HEAD/packages/tool-cache) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/tool-cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/tool-cache)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-08 19:41:10 +00:00
dependabot-preview[bot]
d17d5099d6 deps: bump @types/jest from 25.1.3 to 25.1.4
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.3 to 25.1.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-08 19:35:27 +00:00
Shohei Ueda
61f1757c8c deps: bump hub 2.14.1 to 2.14.2 2020-03-07 19:33:15 +09:00
dependabot-preview[bot]
f9fbf81b0c deps: bump eslint-plugin-jest from 23.8.1 to 23.8.2
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.8.1 to 23.8.2.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.8.1...v23.8.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-06 10:02:06 +00:00
dependabot-preview[bot]
cc6e8832e8 deps: bump @actions/core from 1.2.2 to 1.2.3
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 04:24:45 +00:00
dependabot-preview[bot]
0a1c87ea74 deps: bump @typescript-eslint/parser from 2.21.0 to 2.22.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.22.0/packages/parser)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 04:17:22 +00:00
dependabot-preview[bot]
4ce8f62edb deps: bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v2.22.0/packages/eslint-plugin)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-03 04:12:15 +00:00
dependabot-preview[bot]
f48589d80e deps: bump eslint-plugin-jest from 23.8.0 to 23.8.1 (#198)
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.8.0 to 23.8.1.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.8.0...v23.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 21:36:03 +09:00
dependabot-preview[bot]
9026a94533 deps: bump typescript from 3.8.2 to 3.8.3
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.8.2 to 3.8.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.8.2...v3.8.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 12:22:57 +00:00
dependabot-preview[bot]
c430dcefd1 deps: bump nock from 12.0.1 to 12.0.2
Bumps [nock](https://github.com/nock/nock) from 12.0.1 to 12.0.2.
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v12.0.1...v12.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 12:13:58 +00:00
dependabot-preview[bot]
bc46e4063a deps: bump @types/node from 12.12.28 to 12.12.29
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.28 to 12.12.29.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-02 12:08:54 +00:00
peaceiris
6eb91d4870 chore(release): Remove build assets [skip ci] 2020-02-26 20:15:43 +09:00
11 changed files with 1663 additions and 1874 deletions

View File

@@ -2,7 +2,7 @@ version: 1
update_configs: update_configs:
- package_manager: "javascript" - package_manager: "javascript"
directory: "/" directory: "/"
update_schedule: "daily" update_schedule: "live"
default_labels: default_labels:
- "dependencies" - "dependencies"
commit_message: commit_message:

37
.github/workflows/dev-image.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: 'Dev Image CI'
on:
push:
branches:
- master
paths:
- '.github/workflows/dev-image.yml'
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
pull_request:
types:
- opened
- synchronize
paths:
- '.github/workflows/dev-image.yml'
- '.dockerignore'
- '.nvmrc'
- 'Dockerfile'
- 'Makefile'
jobs:
skipci:
runs-on: ubuntu-18.04
steps:
- run: echo "[skip ci] ${{ contains(github.event.head_commit.message, '[skip ci]') }}"
dev-image-test:
runs-on: ubuntu-18.04
if: contains(github.event.head_commit.message, '[skip ci]') == false
steps:
- uses: actions/checkout@v2
- run: make build
- run: make cirun cmd="npm ci"
- run: make ciall

View File

@@ -3,13 +3,12 @@ name: Release
on: on:
push: push:
tags: tags:
- 'v*.*.*' - 'v*.*.*'
jobs: jobs:
release: release:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Dump GitHub context - name: Dump GitHub context
@@ -19,8 +18,8 @@ jobs:
- name: Install github/hub - name: Install github/hub
run: | run: |
export HUB_VERSION="2.14.1" export HUB_VERSION="2.14.2"
curl -fsSL https://github.com/github/hub/raw/40e421edd2c63d57bb8daa4bb9bbdfa21e8becf9/script/get | bash -s "${HUB_VERSION}" curl -fsSL https://github.com/github/hub/raw/8d91904208171b013f9a9d1175f4ab39068db047/script/get | bash -s "${HUB_VERSION}"
- name: Create release - name: Create release
env: env:

2
.nvmrc
View File

@@ -1 +1 @@
12.15.0 12.16.1

View File

@@ -2,6 +2,72 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [2.4.8](https://github.com/peaceiris/actions-hugo/compare/v2.4.7...v2.4.8) (2020-03-27)
### ci
* Add workflow for developing container (#231) ([b71ad2d](https://github.com/peaceiris/actions-hugo/commit/b71ad2d01404ec9d8cf12979cca37d47310e9aa7)), closes [#231](https://github.com/peaceiris/actions-hugo/issues/231)
* set update_schedule live ([61937d1](https://github.com/peaceiris/actions-hugo/commit/61937d118fd2de55dd288ee18edabb0e9f9d11e0))
### deps
* bump @types/node from 12.12.30 to 12.12.31 ([64135da](https://github.com/peaceiris/actions-hugo/commit/64135da123255189740dea81571630c0d8fcf7e7))
* bump @typescript-eslint/eslint-plugin from 2.23.0 to 2.24.0 ([2935a38](https://github.com/peaceiris/actions-hugo/commit/2935a38e763ed8cd23c43ba95236eeb811f659f9))
* bump @typescript-eslint/eslint-plugin from 2.24.0 to 2.25.0 ([b9b88c0](https://github.com/peaceiris/actions-hugo/commit/b9b88c049f68fdd1e11e50212923d07eb22967e1))
* bump @typescript-eslint/parser from 2.23.0 to 2.24.0 (#213) ([8807669](https://github.com/peaceiris/actions-hugo/commit/88076695a918ea1419ddeec9e16ba30e9faf4134)), closes [#213](https://github.com/peaceiris/actions-hugo/issues/213)
* bump @typescript-eslint/parser from 2.24.0 to 2.25.0 ([6bed412](https://github.com/peaceiris/actions-hugo/commit/6bed4121ee5d7bd8a3e22c856261b59b442f8193))
* bump @zeit/ncc from 0.21.1 to 0.22.0 ([c3a324f](https://github.com/peaceiris/actions-hugo/commit/c3a324ff3cf3e1b975c594d266ba4c7bd09daa19))
* bump jest from 25.1.0 to 25.2.0 ([d7620db](https://github.com/peaceiris/actions-hugo/commit/d7620db17f5b0b91867f71d01874a879651a727b))
* bump jest from 25.2.0 to 25.2.1 ([8cd28fc](https://github.com/peaceiris/actions-hugo/commit/8cd28fc857360a781d9ebd7103da74c17d4a2ce7))
* bump jest from 25.2.1 to 25.2.2 ([601b110](https://github.com/peaceiris/actions-hugo/commit/601b110315ada15bc46842682625b71a0be1902c))
* bump jest from 25.2.2 to 25.2.3 ([1649bea](https://github.com/peaceiris/actions-hugo/commit/1649bea4d0a67e4b6af6ed2b95fea1e66673239b))
* bump jest-circus from 25.1.0 to 25.2.0 ([702a3e4](https://github.com/peaceiris/actions-hugo/commit/702a3e4c9ae5cf3ce9e380e45504d2b28e0dcc46))
* bump jest-circus from 25.2.0 to 25.2.1 ([c1f3690](https://github.com/peaceiris/actions-hugo/commit/c1f369064cf05c10277655226e2a4723266d7161))
* bump jest-circus from 25.2.1 to 25.2.2 ([1bafab6](https://github.com/peaceiris/actions-hugo/commit/1bafab6d5aa5d524d86e28cf6bcb8c41a09cc51d))
* bump jest-circus from 25.2.2 to 25.2.3 ([a2600d5](https://github.com/peaceiris/actions-hugo/commit/a2600d572b522fb75cd38aba6b6306501618579d))
* bump lint-staged from 10.0.8 to 10.0.9 ([35eb187](https://github.com/peaceiris/actions-hugo/commit/35eb187a3cd1e2b3370f881bfc97396d483585f8))
* bump nock from 12.0.2 to 12.0.3 ([a3f7ea4](https://github.com/peaceiris/actions-hugo/commit/a3f7ea4140f3f85196f7ea5d76bd2eeb5524a646))
* bump prettier from 1.19.1 to 2.0.1 ([da65b73](https://github.com/peaceiris/actions-hugo/commit/da65b73f4d4d3f23a392b882cb81c6538dda23b0))
* bump prettier from 2.0.1 to 2.0.2 ([9b11300](https://github.com/peaceiris/actions-hugo/commit/9b11300647ddf5ce6c42733e335be78e5ae855b6))
* node from 12.15.0 to 12.16.1 (#232) ([e470a76](https://github.com/peaceiris/actions-hugo/commit/e470a760d3eda16dddba7bcf4c66a3ae371c61f2)), closes [#232](https://github.com/peaceiris/actions-hugo/issues/232)
### docs
* Add codeclimate badge ([c69c549](https://github.com/peaceiris/actions-hugo/commit/c69c549ff8c5106c435657fba74f76cb807db1ec))
* bump actions/checkout to v2 ([33d3f73](https://github.com/peaceiris/actions-hugo/commit/33d3f73fc7bb54a2fe21cdeee8e93881c3094b92))
* update notes ([4cd0877](https://github.com/peaceiris/actions-hugo/commit/4cd0877e8793c755e53b341fa5fe43801f9319a2))
## [2.4.7](https://github.com/peaceiris/actions-hugo/compare/v2.4.6...v2.4.7) (2020-03-13)
### ci
* update script link [skip ci] ([3d71d24](https://github.com/peaceiris/actions-hugo/commit/3d71d2403d36fe0c2770d1a69526ca5d8ba884c5))
### deps
* [security] bump acorn from 6.4.0 to 6.4.1 ([ea7a8f0](https://github.com/peaceiris/actions-hugo/commit/ea7a8f03436f5eefe2b0509210f62bb60eb645ce))
* bump @actions/core from 1.2.2 to 1.2.3 ([cc6e883](https://github.com/peaceiris/actions-hugo/commit/cc6e8832e8df3d38ea15016148e7499d67595412))
* bump @actions/tool-cache from 1.3.1 to 1.3.2 ([c6512d4](https://github.com/peaceiris/actions-hugo/commit/c6512d44a3620fbc3158c62e47d6a3e1a8a0696d))
* bump @actions/tool-cache from 1.3.2 to 1.3.3 ([0d2e118](https://github.com/peaceiris/actions-hugo/commit/0d2e11837b439e036687b3766548fe67efe14e04))
* bump @types/jest from 25.1.3 to 25.1.4 ([d17d509](https://github.com/peaceiris/actions-hugo/commit/d17d5099d67ed8aca0af28f612ffa36a2751b013))
* bump @types/node from 12.12.28 to 12.12.29 ([bc46e40](https://github.com/peaceiris/actions-hugo/commit/bc46e4063a096f87cc0faaf107b160c4686b9462))
* bump @types/node from 12.12.29 to 12.12.30 ([de4f7b1](https://github.com/peaceiris/actions-hugo/commit/de4f7b11367e07ace82f9ada91775cfbb03b88da))
* bump @typescript-eslint/eslint-plugin from 2.21.0 to 2.22.0 ([4ce8f62](https://github.com/peaceiris/actions-hugo/commit/4ce8f62edb9e86b50989996e17b6a8ed20b30a4b))
* bump @typescript-eslint/eslint-plugin from 2.22.0 to 2.23.0 ([844e33d](https://github.com/peaceiris/actions-hugo/commit/844e33d4107bfb7ab1cc21f6a4fab8b51bf441b1))
* bump @typescript-eslint/parser from 2.21.0 to 2.22.0 ([0a1c87e](https://github.com/peaceiris/actions-hugo/commit/0a1c87ea74e0cdf3a147e464f7814576f07a46bf))
* bump @typescript-eslint/parser from 2.22.0 to 2.23.0 ([703c21f](https://github.com/peaceiris/actions-hugo/commit/703c21fa41ab2b6f1c71a6bdbc4f795eff75abea))
* bump eslint-plugin-jest from 23.8.0 to 23.8.1 (#198) ([f48589d](https://github.com/peaceiris/actions-hugo/commit/f48589d80e2cf825cef0479d547f2767a2bf9414)), closes [#198](https://github.com/peaceiris/actions-hugo/issues/198)
* bump eslint-plugin-jest from 23.8.1 to 23.8.2 ([f9fbf81](https://github.com/peaceiris/actions-hugo/commit/f9fbf81b0c07b5293e596585fc22b49e40d818ec))
* bump hub 2.14.1 to 2.14.2 ([61f1757](https://github.com/peaceiris/actions-hugo/commit/61f1757c8c728f8fd8e8e96f56b81171e007ef28))
* bump nock from 12.0.1 to 12.0.2 ([c430dce](https://github.com/peaceiris/actions-hugo/commit/c430dcefd1e96d100f28c2a8e5b5084a84fe2c0d))
* bump typescript from 3.8.2 to 3.8.3 ([9026a94](https://github.com/peaceiris/actions-hugo/commit/9026a9453330ef8189b318c2339c250ea05c5947))
## [2.4.6](https://github.com/peaceiris/actions-hugo/compare/v2.4.5...v2.4.6) (2020-02-26) ## [2.4.6](https://github.com/peaceiris/actions-hugo/compare/v2.4.5...v2.4.6) (2020-02-26)

View File

@@ -13,7 +13,7 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
WORKDIR /git WORKDIR /git
ENV GIT_VERSION="2.25.0" ENV GIT_VERSION="2.26.0"
RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \ RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
tar -zxf "./v${GIT_VERSION}.tar.gz" && \ tar -zxf "./v${GIT_VERSION}.tar.gz" && \
rm "./v${GIT_VERSION}.tar.gz" && \ rm "./v${GIT_VERSION}.tar.gz" && \
@@ -24,5 +24,6 @@ RUN wget -q "https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz" && \
make install make install
WORKDIR /repo WORKDIR /repo
ENV RUNNER_TEMP="/tmp"
CMD [ "bash" ] CMD [ "bash" ]

View File

@@ -4,6 +4,7 @@ IMAGE_NAME := actions_hugo_dev:latest
NODE_VERSION := $(shell cat ./.nvmrc) NODE_VERSION := $(shell cat ./.nvmrc)
DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION) DOCKER_BUILD := docker build . -t $(IMAGE_NAME) --build-arg NODE_VERSION=$(NODE_VERSION)
DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME) DOCKER_RUN := docker run --rm -i -t -v ${PWD}:/repo -v ~/.gitconfig:/root/.gitconfig $(IMAGE_NAME)
DOCKER_RUN_CI := docker run --rm -v ${PWD}:/repo $(IMAGE_NAME)
.PHONY: build .PHONY: build
@@ -14,10 +15,18 @@ build:
run: run:
$(DOCKER_RUN) $(cmd) $(DOCKER_RUN) $(cmd)
.PHONY: cirun
cirun:
$(DOCKER_RUN_CI) $(cmd)
.PHONY: test .PHONY: test
test: test:
$(DOCKER_RUN) npm test $(DOCKER_RUN) npm test
.PHONY: commit .PHONY: all
commit: all:
$(DOCKER_RUN) git commit -m "$(msg)" $(DOCKER_RUN) npm run all
.PHONY: ciall
ciall:
$(DOCKER_RUN_CI) npm run all

View File

@@ -1,11 +1,13 @@
[![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE) [![license](https://img.shields.io/github/license/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/blob/master/LICENSE)
[![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest) [![release](https://img.shields.io/github/release/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases/latest)
[![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases) [![GitHub release date](https://img.shields.io/github/release-date/peaceiris/actions-hugo.svg)](https://github.com/peaceiris/actions-hugo/releases)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-hugo/releases.atom)
![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=master&event=push) ![Test](https://github.com/peaceiris/actions-hugo/workflows/Test/badge.svg?branch=master&event=push)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=peaceiris/actions-hugo)](https://dependabot.com)
[![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo) [![CodeFactor](https://www.codefactor.io/repository/github/peaceiris/actions-hugo/badge)](https://www.codefactor.io/repository/github/peaceiris/actions-hugo)
[![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo) [![codecov](https://codecov.io/gh/peaceiris/actions-hugo/branch/master/graph/badge.svg)](https://codecov.io/gh/peaceiris/actions-hugo)
[![Release Feed](https://img.shields.io/badge/release-feed-yellow)](https://github.com/peaceiris/actions-hugo/releases.atom) [![Maintainability](https://api.codeclimate.com/v1/badges/ebf2eef3a046b396ba9c/maintainability)](https://codeclimate.com/github/peaceiris/actions-hugo/maintainability)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=peaceiris/actions-hugo)](https://dependabot.com)
<img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg"> <img width="400" alt="GitHub Actions for Hugo" src="./images/ogp.svg">
@@ -80,9 +82,9 @@ jobs:
deploy: deploy:
runs-on: ubuntu-18.04 runs-on: ubuntu-18.04
steps: steps:
- uses: actions/checkout@v1 # v2 does not have submodules option now - uses: actions/checkout@v2
# with: with:
# submodules: true submodules: true
- name: Setup Hugo - name: Setup Hugo
uses: peaceiris/actions-hugo@v2 uses: peaceiris/actions-hugo@v2
@@ -219,19 +221,14 @@ The alpine base Hugo Docker image is provided on the following repository.
## Maintainer Notes ## Maintainer Notes
Run `npm` and `git commit` commands on a container. Run `npm test` on a Docker container.
**On Host**
```sh ```sh
# Docker # On container
make build make build
make run make all
make run cmd="env"
make test
make commit msg="chore: Add Makefile"
# Release # Release script on host
./release.sh ./release.sh
``` ```

View File

@@ -942,9 +942,9 @@ module.exports = require("tls");
/***/ }), /***/ }),
/***/ 18: /***/ 18:
/***/ (function() { /***/ (function(module) {
eval("require")("encoding"); module.exports = eval("require")("encoding");
/***/ }), /***/ }),
@@ -3296,6 +3296,13 @@ exports.setFailed = setFailed;
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
// Logging Commands // Logging Commands
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
/**
* Gets whether Actions Step Debug is on or not
*/
function isDebug() {
return process.env['RUNNER_DEBUG'] === '1';
}
exports.isDebug = isDebug;
/** /**
* Writes debug message to user log * Writes debug message to user log
* @param message debug message * @param message debug message
@@ -3427,9 +3434,12 @@ const os = __importStar(__webpack_require__(87));
const path = __importStar(__webpack_require__(622)); const path = __importStar(__webpack_require__(622));
const httpm = __importStar(__webpack_require__(539)); const httpm = __importStar(__webpack_require__(539));
const semver = __importStar(__webpack_require__(550)); const semver = __importStar(__webpack_require__(550));
const stream = __importStar(__webpack_require__(413));
const util = __importStar(__webpack_require__(669));
const v4_1 = __importDefault(__webpack_require__(826)); const v4_1 = __importDefault(__webpack_require__(826));
const exec_1 = __webpack_require__(986); const exec_1 = __webpack_require__(986);
const assert_1 = __webpack_require__(357); const assert_1 = __webpack_require__(357);
const retry_helper_1 = __webpack_require__(979);
class HTTPError extends Error { class HTTPError extends Error {
constructor(httpStatusCode) { constructor(httpStatusCode) {
super(`Unexpected HTTP response: ${httpStatusCode}`); super(`Unexpected HTTP response: ${httpStatusCode}`);
@@ -3440,31 +3450,6 @@ class HTTPError extends Error {
exports.HTTPError = HTTPError; exports.HTTPError = HTTPError;
const IS_WINDOWS = process.platform === 'win32'; const IS_WINDOWS = process.platform === 'win32';
const userAgent = 'actions/tool-cache'; const userAgent = 'actions/tool-cache';
// On load grab temp directory and cache directory and remove them from env (currently don't want to expose this)
let tempDirectory = process.env['RUNNER_TEMP'] || '';
let cacheRoot = process.env['RUNNER_TOOL_CACHE'] || '';
// If directories not found, place them in common temp locations
if (!tempDirectory || !cacheRoot) {
let baseLocation;
if (IS_WINDOWS) {
// On windows use the USERPROFILE env variable
baseLocation = process.env['USERPROFILE'] || 'C:\\';
}
else {
if (process.platform === 'darwin') {
baseLocation = '/Users';
}
else {
baseLocation = '/home';
}
}
if (!tempDirectory) {
tempDirectory = path.join(baseLocation, 'actions', 'temp');
}
if (!cacheRoot) {
cacheRoot = path.join(baseLocation, 'actions', 'cache');
}
}
/** /**
* Download a tool from an url and stream it into a file * Download a tool from an url and stream it into a file
* *
@@ -3474,52 +3459,71 @@ if (!tempDirectory || !cacheRoot) {
*/ */
function downloadTool(url, dest) { function downloadTool(url, dest) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
// Wrap in a promise so that we can resolve from within stream callbacks dest = dest || path.join(_getTempDirectory(), v4_1.default());
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () { yield io.mkdirP(path.dirname(dest));
try { core.debug(`Downloading ${url}`);
const http = new httpm.HttpClient(userAgent, [], { core.debug(`Destination ${dest}`);
allowRetries: true, const maxAttempts = 3;
maxRetries: 3 const minSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS', 10);
}); const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);
dest = dest || path.join(tempDirectory, v4_1.default()); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);
yield io.mkdirP(path.dirname(dest)); return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
core.debug(`Downloading ${url}`); return yield downloadToolAttempt(url, dest || '');
core.debug(`Downloading ${dest}`); }), (err) => {
if (fs.existsSync(dest)) { if (err instanceof HTTPError && err.httpStatusCode) {
throw new Error(`Destination file path ${dest} already exists`); // Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests
if (err.httpStatusCode < 500 &&
err.httpStatusCode !== 408 &&
err.httpStatusCode !== 429) {
return false;
} }
const response = yield http.get(url);
if (response.message.statusCode !== 200) {
const err = new HTTPError(response.message.statusCode);
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
throw err;
}
const file = fs.createWriteStream(dest);
file.on('open', () => __awaiter(this, void 0, void 0, function* () {
try {
const stream = response.message.pipe(file);
stream.on('close', () => {
core.debug('download complete');
resolve(dest);
});
}
catch (err) {
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
reject(err);
}
}));
file.on('error', err => {
file.end();
reject(err);
});
} }
catch (err) { // Otherwise retry
reject(err); return true;
} });
}));
}); });
} }
exports.downloadTool = downloadTool; exports.downloadTool = downloadTool;
function downloadToolAttempt(url, dest) {
return __awaiter(this, void 0, void 0, function* () {
if (fs.existsSync(dest)) {
throw new Error(`Destination file path ${dest} already exists`);
}
// Get the response headers
const http = new httpm.HttpClient(userAgent, [], {
allowRetries: false
});
const response = yield http.get(url);
if (response.message.statusCode !== 200) {
const err = new HTTPError(response.message.statusCode);
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
throw err;
}
// Download the response body
const pipeline = util.promisify(stream.pipeline);
const responseMessageFactory = _getGlobal('TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY', () => response.message);
const readStream = responseMessageFactory();
let succeeded = false;
try {
yield pipeline(readStream, fs.createWriteStream(dest));
core.debug('download complete');
succeeded = true;
return dest;
}
finally {
// Error, delete dest before retry
if (!succeeded) {
core.debug('download failed');
try {
yield io.rmRF(dest);
}
catch (err) {
core.debug(`Failed to delete '${dest}'. ${err.message}`);
}
}
}
});
}
/** /**
* Extract a .7z file * Extract a .7z file
* *
@@ -3609,14 +3613,17 @@ function extractTar(file, dest, flags = 'xz') {
// Create dest // Create dest
dest = yield _createExtractFolder(dest); dest = yield _createExtractFolder(dest);
// Determine whether GNU tar // Determine whether GNU tar
core.debug('Checking tar --version');
let versionOutput = ''; let versionOutput = '';
yield exec_1.exec('tar --version', [], { yield exec_1.exec('tar --version', [], {
ignoreReturnCode: true, ignoreReturnCode: true,
silent: true,
listeners: { listeners: {
stdout: (data) => (versionOutput += data.toString()), stdout: (data) => (versionOutput += data.toString()),
stderr: (data) => (versionOutput += data.toString()) stderr: (data) => (versionOutput += data.toString())
} }
}); });
core.debug(versionOutput.trim());
const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR'); const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');
// Initialize args // Initialize args
const args = [flags]; const args = [flags];
@@ -3777,7 +3784,7 @@ function find(toolName, versionSpec, arch) {
let toolPath = ''; let toolPath = '';
if (versionSpec) { if (versionSpec) {
versionSpec = semver.clean(versionSpec) || ''; versionSpec = semver.clean(versionSpec) || '';
const cachePath = path.join(cacheRoot, toolName, versionSpec, arch); const cachePath = path.join(_getCacheDirectory(), toolName, versionSpec, arch);
core.debug(`checking cache: ${cachePath}`); core.debug(`checking cache: ${cachePath}`);
if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) {
core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); core.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`);
@@ -3799,7 +3806,7 @@ exports.find = find;
function findAllVersions(toolName, arch) { function findAllVersions(toolName, arch) {
const versions = []; const versions = [];
arch = arch || os.arch(); arch = arch || os.arch();
const toolPath = path.join(cacheRoot, toolName); const toolPath = path.join(_getCacheDirectory(), toolName);
if (fs.existsSync(toolPath)) { if (fs.existsSync(toolPath)) {
const children = fs.readdirSync(toolPath); const children = fs.readdirSync(toolPath);
for (const child of children) { for (const child of children) {
@@ -3818,7 +3825,7 @@ function _createExtractFolder(dest) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
if (!dest) { if (!dest) {
// create a temp dir // create a temp dir
dest = path.join(tempDirectory, v4_1.default()); dest = path.join(_getTempDirectory(), v4_1.default());
} }
yield io.mkdirP(dest); yield io.mkdirP(dest);
return dest; return dest;
@@ -3826,7 +3833,7 @@ function _createExtractFolder(dest) {
} }
function _createToolPath(tool, version, arch) { function _createToolPath(tool, version, arch) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');
core.debug(`destination ${folderPath}`); core.debug(`destination ${folderPath}`);
const markerPath = `${folderPath}.complete`; const markerPath = `${folderPath}.complete`;
yield io.rmRF(folderPath); yield io.rmRF(folderPath);
@@ -3836,7 +3843,7 @@ function _createToolPath(tool, version, arch) {
}); });
} }
function _completeToolPath(tool, version, arch) { function _completeToolPath(tool, version, arch) {
const folderPath = path.join(cacheRoot, tool, semver.clean(version) || version, arch || ''); const folderPath = path.join(_getCacheDirectory(), tool, semver.clean(version) || version, arch || '');
const markerPath = `${folderPath}.complete`; const markerPath = `${folderPath}.complete`;
fs.writeFileSync(markerPath, ''); fs.writeFileSync(markerPath, '');
core.debug('finished caching tool'); core.debug('finished caching tool');
@@ -3873,6 +3880,31 @@ function _evaluateVersions(versions, versionSpec) {
} }
return version; return version;
} }
/**
* Gets RUNNER_TOOL_CACHE
*/
function _getCacheDirectory() {
const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';
assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');
return cacheDirectory;
}
/**
* Gets RUNNER_TEMP
*/
function _getTempDirectory() {
const tempDirectory = process.env['RUNNER_TEMP'] || '';
assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');
return tempDirectory;
}
/**
* Gets a global variable
*/
function _getGlobal(key, defaultValue) {
/* eslint-disable @typescript-eslint/no-explicit-any */
const value = global[key];
/* eslint-enable @typescript-eslint/no-explicit-any */
return value !== undefined ? value : defaultValue;
}
//# sourceMappingURL=tool-cache.js.map //# sourceMappingURL=tool-cache.js.map
/***/ }), /***/ }),
@@ -3917,6 +3949,15 @@ var HttpCodes;
HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
var Headers;
(function (Headers) {
Headers["Accept"] = "accept";
Headers["ContentType"] = "content-type";
})(Headers = exports.Headers || (exports.Headers = {}));
var MediaTypes;
(function (MediaTypes) {
MediaTypes["ApplicationJson"] = "application/json";
})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
/** /**
* Returns the proxy URL, depending upon the supplied url and proxy environment variables. * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
@@ -4015,6 +4056,36 @@ class HttpClient {
sendStream(verb, requestUrl, stream, additionalHeaders) { sendStream(verb, requestUrl, stream, additionalHeaders) {
return this.request(verb, requestUrl, stream, additionalHeaders); return this.request(verb, requestUrl, stream, additionalHeaders);
} }
/**
* Gets a typed object from an endpoint
* Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
*/
async getJson(requestUrl, additionalHeaders = {}) {
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
let res = await this.get(requestUrl, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async postJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.post(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async putJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.put(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
async patchJson(requestUrl, obj, additionalHeaders = {}) {
let data = JSON.stringify(obj, null, 2);
additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
let res = await this.patch(requestUrl, data, additionalHeaders);
return this._processResponse(res, this.requestOptions);
}
/** /**
* Makes a raw http request. * Makes a raw http request.
* All other methods such as get, post, patch, and request ultimately call this. * All other methods such as get, post, patch, and request ultimately call this.
@@ -4198,6 +4269,14 @@ class HttpClient {
} }
return lowercaseKeys(headers || {}); return lowercaseKeys(headers || {});
} }
_getExistingOrDefaultHeader(additionalHeaders, header, _default) {
const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
let clientHeader;
if (this.requestOptions && this.requestOptions.headers) {
clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
}
return additionalHeaders[header] || clientHeader || _default;
}
_getAgent(parsedUrl) { _getAgent(parsedUrl) {
let agent; let agent;
let proxyUrl = pm.getProxyUrl(parsedUrl); let proxyUrl = pm.getProxyUrl(parsedUrl);
@@ -4265,6 +4344,73 @@ class HttpClient {
const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
return new Promise(resolve => setTimeout(() => resolve(), ms)); return new Promise(resolve => setTimeout(() => resolve(), ms));
} }
static dateTimeDeserializer(key, value) {
if (typeof value === 'string') {
let a = new Date(value);
if (!isNaN(a.valueOf())) {
return a;
}
}
return value;
}
async _processResponse(res, options) {
return new Promise(async (resolve, reject) => {
const statusCode = res.message.statusCode;
const response = {
statusCode: statusCode,
result: null,
headers: {}
};
// not found leads to null obj returned
if (statusCode == HttpCodes.NotFound) {
resolve(response);
}
let obj;
let contents;
// get the result from the body
try {
contents = await res.readBody();
if (contents && contents.length > 0) {
if (options && options.deserializeDates) {
obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
}
else {
obj = JSON.parse(contents);
}
response.result = obj;
}
response.headers = res.message.headers;
}
catch (err) {
// Invalid resource (contents not json); leaving result obj null
}
// note that 3xx redirects are handled by the http layer.
if (statusCode > 299) {
let msg;
// if exception/error in body, attempt to get better error
if (obj && obj.message) {
msg = obj.message;
}
else if (contents && contents.length > 0) {
// it may be the case that the exception is in the body message as string
msg = contents;
}
else {
msg = "Failed request: (" + statusCode + ")";
}
let err = new Error(msg);
// attach statusCode and body obj (if available) to the error object
err['statusCode'] = statusCode;
if (response.result) {
err['result'] = response.result;
}
reject(err);
}
else {
resolve(response);
}
});
}
} }
exports.HttpClient = HttpClient; exports.HttpClient = HttpClient;
@@ -6429,6 +6575,83 @@ function checkBypass(reqUrl) {
exports.checkBypass = checkBypass; exports.checkBypass = checkBypass;
/***/ }),
/***/ 979:
/***/ (function(__unusedmodule, exports, __webpack_require__) {
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(__webpack_require__(470));
/**
* Internal class for retries
*/
class RetryHelper {
constructor(maxAttempts, minSeconds, maxSeconds) {
if (maxAttempts < 1) {
throw new Error('max attempts should be greater than or equal to 1');
}
this.maxAttempts = maxAttempts;
this.minSeconds = Math.floor(minSeconds);
this.maxSeconds = Math.floor(maxSeconds);
if (this.minSeconds > this.maxSeconds) {
throw new Error('min seconds should be less than or equal to max seconds');
}
}
execute(action, isRetryable) {
return __awaiter(this, void 0, void 0, function* () {
let attempt = 1;
while (attempt < this.maxAttempts) {
// Try
try {
return yield action();
}
catch (err) {
if (isRetryable && !isRetryable(err)) {
throw err;
}
core.info(err.message);
}
// Sleep
const seconds = this.getSleepAmount();
core.info(`Waiting ${seconds} seconds before trying again`);
yield this.sleep(seconds);
attempt++;
}
// Last attempt
return yield action();
});
}
getSleepAmount() {
return (Math.floor(Math.random() * (this.maxSeconds - this.minSeconds + 1)) +
this.minSeconds);
}
sleep(seconds) {
return __awaiter(this, void 0, void 0, function* () {
return new Promise(resolve => setTimeout(resolve, seconds * 1000));
});
}
}
exports.RetryHelper = RetryHelper;
//# sourceMappingURL=retry-helper.js.map
/***/ }), /***/ }),
/***/ 986: /***/ 986:

2979
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "actions-hugo", "name": "actions-hugo",
"version": "2.4.6", "version": "2.4.8",
"description": "GitHub Actions for Hugo", "description": "GitHub Actions for Hugo",
"main": "lib/index.js", "main": "lib/index.js",
"engines": { "engines": {
@@ -8,6 +8,7 @@
"npm": ">=6.13.7" "npm": ">=6.13.7"
}, },
"scripts": { "scripts": {
"all": "npm run format:check && npm run lint && npm test",
"lint": "eslint ./{src,__tests__}/**/*.ts", "lint": "eslint ./{src,__tests__}/**/*.ts",
"lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts", "lint:fix": "eslint --fix ./{src,__tests__}/**/*.ts",
"test": "jest --coverage --verbose", "test": "jest --coverage --verbose",
@@ -28,8 +29,7 @@
"lint-staged": { "lint-staged": {
"src/**/*.ts": [ "src/**/*.ts": [
"prettier --check", "prettier --check",
"eslint", "eslint"
"jest --bail --findRelatedTests"
] ]
}, },
"repository": { "repository": {
@@ -51,29 +51,29 @@
}, },
"homepage": "https://github.com/peaceiris/actions-hugo#readme", "homepage": "https://github.com/peaceiris/actions-hugo#readme",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.2", "@actions/core": "^1.2.3",
"@actions/exec": "^1.0.3", "@actions/exec": "^1.0.3",
"@actions/io": "^1.0.2", "@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.3.1", "@actions/tool-cache": "^1.3.3",
"node-fetch": "^2.6.0" "node-fetch": "^2.6.0"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^25.1.3", "@types/jest": "^25.1.4",
"@types/node": "~12", "@types/node": "~12",
"@types/node-fetch": "^2.5.5", "@types/node-fetch": "^2.5.5",
"@typescript-eslint/eslint-plugin": "^2.21.0", "@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.21.0", "@typescript-eslint/parser": "^2.25.0",
"@zeit/ncc": "^0.21.1", "@zeit/ncc": "^0.22.0",
"eslint": "^6.8.0", "eslint": "^6.8.0",
"eslint-plugin-jest": "^23.8.0", "eslint-plugin-jest": "^23.8.2",
"husky": "^4.2.3", "husky": "^4.2.3",
"jest": "^25.1.0", "jest": "^25.2.3",
"jest-circus": "^25.1.0", "jest-circus": "^25.2.3",
"lint-staged": "^10.0.8", "lint-staged": "^10.0.9",
"nock": "^12.0.1", "nock": "^12.0.3",
"prettier": "1.19.1", "prettier": "2.0.2",
"standard-version": "^7.1.0", "standard-version": "^7.1.0",
"ts-jest": "^25.2.1", "ts-jest": "^25.2.1",
"typescript": "^3.8.2" "typescript": "^3.8.3"
} }
} }