Compare commits

..
86 Commits
Author SHA1 Message Date
Federico Builes b15d68a617 Merge pull request #163 from actions/dependabot/npm_and_yarn/zod-3.17.9
Bump zod from 3.17.4 to 3.17.9
2022-07-19 13:29:36 +02:00
Federico Builes 86ba360860 updating dist 2022-07-19 05:28:23 -06:00
dependabot[bot] 1c643b69e3 Bump zod from 3.17.4 to 3.17.9
Bumps [zod](https://github.com/colinhacks/zod) from 3.17.4 to 3.17.9.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colinhacks/zod/compare/v3.17.4...v3.17.9)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-19 11:26:12 +00:00
Federico Builes cc90e94fd7 Merge pull request #162 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.30.7
Bump @typescript-eslint/parser from 5.30.6 to 5.30.7
2022-07-19 13:13:51 +02:00
dependabot[bot] ca03cb626b Bump @typescript-eslint/parser from 5.30.6 to 5.30.7
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.6 to 5.30.7.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.7/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-19 11:12:11 +00:00
Federico Builes 0c672b9f6f Merge pull request #161 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.30.7
Bump @typescript-eslint/eslint-plugin from 5.30.6 to 5.30.7
2022-07-19 13:11:11 +02:00
dependabot[bot] 9b38d34b70 Bump @typescript-eslint/eslint-plugin from 5.30.6 to 5.30.7
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.30.6 to 5.30.7.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.7/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-19 01:53:55 +00:00
Federico Builes bd0f0459f8 Merge pull request #160 from actions/dependabot/npm_and_yarn/eslint-8.20.0
Bump eslint from 8.19.0 to 8.20.0
2022-07-18 15:02:44 +02:00
Federico Builes ace98b5898 Merge pull request #159 from actions/dependabot/npm_and_yarn/types/node-16.11.45
Bump @types/node from 16.11.44 to 16.11.45
2022-07-18 15:02:24 +02:00
dependabot[bot] 79aa012b58 Bump @types/node from 16.11.44 to 16.11.45
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.44 to 16.11.45.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-18 13:01:56 +00:00
Federico Builes 264bf85801 Merge pull request #158 from actions/dependabot/npm_and_yarn/zod-3.17.4
Bump zod from 3.17.3 to 3.17.4
2022-07-18 15:01:30 +02:00
Federico Builes 0e2da932f6 updating dist files 2022-07-18 07:00:33 -06:00
dependabot[bot] 0a8934fb6a Bump eslint from 8.19.0 to 8.20.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.19.0 to 8.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.19.0...v8.20.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-18 13:00:14 +00:00
Federico Builes f83d7f264c Merge branch 'main' into dependabot/npm_and_yarn/zod-3.17.4 2022-07-18 07:00:01 -06:00
Federico Builes d0e46c9613 Merge pull request #157 from actions/dependabot/npm_and_yarn/eslint-plugin-jest-26.6.0
Bump eslint-plugin-jest from 26.5.3 to 26.6.0
2022-07-18 14:59:20 +02:00
dependabot[bot] 22bb279ab1 Bump zod from 3.17.3 to 3.17.4
Bumps [zod](https://github.com/colinhacks/zod) from 3.17.3 to 3.17.4.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Changelog](https://github.com/colinhacks/zod/blob/master/CHANGELOG.md)
- [Commits](https://github.com/colinhacks/zod/compare/v3.17.3...v3.17.4)

---
updated-dependencies:
- dependency-name: zod
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-18 01:53:03 +00:00
dependabot[bot] d33c19c38d Bump eslint-plugin-jest from 26.5.3 to 26.6.0
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.5.3 to 26.6.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v26.5.3...v26.6.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-18 01:52:43 +00:00
Federico Builes 2ef513a94a Update example tag text. 2022-07-14 09:39:56 +02:00
Federico Builes abd8ae5da7 Make CONTRIBUTING.md examples easier to copy/paste. 2022-07-14 09:35:44 +02:00
Federico Builes 94145f3150 Bumping the version to 2.0.4.
Missed the version changes in the previous release.
2022-07-14 09:31:49 +02:00
Federico Builes af8d39d8a3 Bumping the version to 2.0.3. 2022-07-14 09:14:17 +02:00
Federico Builes b83777ffd0 Merge pull request #156 from actions/dependabot/npm_and_yarn/types/node-16.11.44
Bump @types/node from 16.11.43 to 16.11.44
2022-07-14 09:11:42 +02:00
Federico Builes 1dc503a722 Merge pull request #155 from kachick/fix-154
Ignore removed changes in license checker
2022-07-14 09:10:17 +02:00
dependabot[bot] 8975a27eeb Bump @types/node from 16.11.43 to 16.11.44
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 16.11.43 to 16.11.44.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-14 01:36:49 +00:00
Kenichi Kamiya c003e7f8fc Add more test for added and removed pattern 2022-07-13 19:07:12 +09:00
Kenichi Kamiya ae4118f8fa Update build files with npm run all 2022-07-13 18:11:55 +09:00
Kenichi Kamiya c5d7bdcf7f Ignore removed changes in license checker 2022-07-13 18:11:10 +09:00
Federico Builes bced8aa1b2 Merge pull request #153 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.30.6
Bump @typescript-eslint/parser from 5.30.5 to 5.30.6
2022-07-12 09:07:41 +02:00
dependabot[bot] ba8e0b013b Bump @typescript-eslint/parser from 5.30.5 to 5.30.6
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.5 to 5.30.6.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.6/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-12 07:04:11 +00:00
Federico Builes cfcdef93a4 Merge pull request #152 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.30.6
Bump @typescript-eslint/eslint-plugin from 5.30.5 to 5.30.6
2022-07-12 09:03:21 +02:00
dependabot[bot] 43b6f9fe4a Bump @typescript-eslint/eslint-plugin from 5.30.5 to 5.30.6
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.30.5 to 5.30.6.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.6/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-12 01:46:01 +00:00
Federico Builes 467931ed7e Merge pull request #151 from actions/dependabot/npm_and_yarn/octokit/request-error-3.0.0
Bump @octokit/request-error from 2.1.0 to 3.0.0
2022-07-11 10:52:17 +02:00
Federico Builes 29c7e47bc6 adding dist folder 2022-07-11 10:49:16 +02:00
dependabot[bot] aa4260f0b0 Bump @octokit/request-error from 2.1.0 to 3.0.0
Bumps [@octokit/request-error](https://github.com/octokit/request-error.js) from 2.1.0 to 3.0.0.
- [Release notes](https://github.com/octokit/request-error.js/releases)
- [Commits](https://github.com/octokit/request-error.js/compare/v2.1.0...v3.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/request-error"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-11 02:03:02 +00:00
Federico Builes f187f64fc9 Merge pull request #139 from actions/dependabot/npm_and_yarn/eslint-8.19.0
Bump eslint from 8.18.0 to 8.19.0
2022-07-06 11:09:37 +02:00
Federico Builes f3bcf122c7 Merge pull request #144 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.30.5
Bump @typescript-eslint/eslint-plugin from 5.30.0 to 5.30.5
2022-07-06 11:09:15 +02:00
dependabot[bot] c43f51429e Bump @typescript-eslint/eslint-plugin from 5.30.0 to 5.30.5
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.30.0 to 5.30.5.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.5/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-06 09:02:16 +00:00
dependabot[bot] c9027d07d6 Bump eslint from 8.18.0 to 8.19.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.18.0 to 8.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.18.0...v8.19.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-06 09:02:10 +00:00
Federico Builes c316251843 Merge pull request #146 from kachick/add-vscode-workspace-configs
Enable prettier and recommend eslint in vscode workspace config
2022-07-06 11:01:23 +02:00
Federico Builes d8e436b2d5 Merge pull request #143 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.30.5
Bump @typescript-eslint/parser from 5.30.0 to 5.30.5
2022-07-06 11:01:06 +02:00
Federico Builes 82d4814150 Merge pull request #142 from kachick/fix-lint-errors-and-add-ci
Add CI workflow and fix lint errors
2022-07-06 11:00:13 +02:00
Federico Builes 89de8ab245 Merge pull request #148 from actions/dependabot/npm_and_yarn/nodemon-2.0.19
Bump nodemon from 2.0.18 to 2.0.19
2022-07-06 10:41:04 +02:00
dependabot[bot] 3e74bf2266 Bump @typescript-eslint/parser from 5.30.0 to 5.30.5
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.30.0 to 5.30.5.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.5/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-06 08:40:11 +00:00
Federico Builes 1ea517b3fa Merge pull request #141 from kachick/use-fixed-major-version-for-node-types
Use fixed major version for node types
2022-07-06 10:38:56 +02:00
Federico Builes 2aef88c152 Merge pull request #145 from kachick/fix-typo-dangerouns
Fix a typo s/dangerouns/dangerous/
2022-07-06 10:26:18 +02:00
Kenichi KamiyaandFederico Builes 51d1824002 Focus only on the node issue
https://github.com/actions/dependency-review-action/pull/141#discussion_r914526073

https://github.com/actions/dependency-review-action/pull/141#discussion_r914537222

Co-authored-by: Federico Builes <[email protected]>
2022-07-06 17:13:18 +09:00
dependabot[bot] 94edc9c394 Bump nodemon from 2.0.18 to 2.0.19
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.18 to 2.0.19.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.18...v2.0.19)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-07-06 02:07:14 +00:00
Kenichi Kamiya 7219e93649 Enable prettier and recommend eslint in vscode workspace config 2022-07-05 20:32:34 +09:00
Kenichi Kamiya 08074685be Fix a typo s/dangerouns/dangerous/ 2022-07-05 18:32:34 +09:00
Kenichi Kamiya 3efca1e3dd Update build files with npm run all 2022-07-04 20:13:08 +09:00
Kenichi Kamiya 9fdc2574b8 Fix rest eslint errors manually 2022-07-04 20:12:07 +09:00
Kenichi Kamiya 6e9189a5c1 npx eslint --fix src/**/*.ts 2022-07-04 20:12:07 +09:00
Kenichi Kamiya c6f347d470 npm run format 2022-07-04 20:12:07 +09:00
Kenichi Kamiya 40346e9340 Run test and linter in CI 2022-07-04 20:12:07 +09:00
Kenichi Kamiya 7f576504ed Stop dependabot PRs for different major version of types
It is possible to make a mismatch with actual logic.
2022-07-04 11:25:57 +09:00
Kenichi Kamiya 09100640b0 Adjust types of node to 16.x again
`npm uninstall @types/node && npm install --save-dev "@types/node@^16.11.43"`
2022-07-04 11:23:37 +09:00
Federico Builes 26b7908701 Merge pull request #136 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.30.0
Bump @typescript-eslint/eslint-plugin from 5.29.0 to 5.30.0
2022-06-28 08:04:16 +02:00
dependabot[bot] b564b42423 Bump @typescript-eslint/eslint-plugin from 5.29.0 to 5.30.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.29.0 to 5.30.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-28 05:56:11 +00:00
Federico Builes 2ceda66c21 Merge pull request #135 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.30.0
Bump @typescript-eslint/parser from 5.29.0 to 5.30.0
2022-06-28 07:55:08 +02:00
dependabot[bot] 49a36aa04e Bump @typescript-eslint/parser from 5.29.0 to 5.30.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.29.0 to 5.30.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.30.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-28 01:40:44 +00:00
Brandyn Phelps 17b8abf3bb Merge pull request #132 from kachick/fix-typo
docs: Fix a typo
2022-06-24 14:17:17 -07:00
Kenichi Kamiya c699fc9e3e docs: Fix a typo 2022-06-25 01:18:31 +09:00
Federico Builes 24ab96e8b8 Merge pull request #128 from actions/dependabot/npm_and_yarn/nodemon-2.0.18
Bump nodemon from 2.0.16 to 2.0.18
2022-06-24 08:37:57 +02:00
dependabot[bot] 04f86c1583 Bump nodemon from 2.0.16 to 2.0.18
Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.16 to 2.0.18.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v2.0.16...v2.0.18)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-24 01:41:25 +00:00
Federico Builes 81b5cbd111 Merge pull request #127 from actions/dependabot/npm_and_yarn/typescript-eslint/parser-5.29.0
Bump @typescript-eslint/parser from 5.28.0 to 5.29.0
2022-06-21 07:50:03 +02:00
dependabot[bot] 4b88091897 Bump @typescript-eslint/parser from 5.28.0 to 5.29.0
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.28.0 to 5.29.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.29.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-21 05:49:04 +00:00
Federico Builes febb822f26 Merge pull request #126 from actions/dependabot/npm_and_yarn/typescript-eslint/eslint-plugin-5.29.0
Bump @typescript-eslint/eslint-plugin from 5.28.0 to 5.29.0
2022-06-21 07:48:11 +02:00
dependabot[bot] ea91d29cdf Bump @typescript-eslint/eslint-plugin from 5.28.0 to 5.29.0
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.28.0 to 5.29.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.29.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-21 01:51:23 +00:00
Federico Builes a9539be12a Merge pull request #123 from actions/dependabot/npm_and_yarn/typescript-4.7.4
Bump typescript from 4.7.3 to 4.7.4
2022-06-20 08:14:45 +02:00
Federico Builes 9c688a568f Merge pull request #124 from actions/dependabot/npm_and_yarn/eslint-8.18.0
Bump eslint from 8.17.0 to 8.18.0
2022-06-20 08:14:26 +02:00
dependabot[bot] ff449a1296 Bump eslint from 8.17.0 to 8.18.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.17.0 to 8.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.17.0...v8.18.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-20 01:47:10 +00:00
dependabot[bot] 2a961b0169 Bump typescript from 4.7.3 to 4.7.4
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.7.3 to 4.7.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.7.3...v4.7.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-20 01:46:55 +00:00
Federico Builes 879687b22c Merge pull request #122 from actions/dependabot/npm_and_yarn/prettier-2.7.1
Bump prettier from 2.7.0 to 2.7.1
2022-06-17 07:40:15 +02:00
dependabot[bot] cb52804670 Bump prettier from 2.7.0 to 2.7.1
Bumps [prettier](https://github.com/prettier/prettier) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.7.0...2.7.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-17 01:54:43 +00:00
Federico Builes 17187536c0 Merge pull request #120 from actions/dependabot/npm_and_yarn/types/node-18.0.0
Bump @types/node from 17.0.43 to 18.0.0
2022-06-16 07:18:52 +02:00
Federico Builes c0faf55fe4 Merge pull request #119 from actions/dependabot/npm_and_yarn/actions/core-1.9.0
Bump @actions/core from 1.8.2 to 1.9.0
2022-06-16 07:18:37 +02:00
Federico Builes b6f6142660 adding dist files 2022-06-16 07:07:13 +02:00
Federico Builes 333e7ce17e Merge branch 'main' into dependabot/npm_and_yarn/actions/core-1.9.0 2022-06-16 07:06:25 +02:00
Federico Builes 4e9a45ca5b Merge pull request #121 from kachick/fix-duplicate-words
Fix duplicate words in README
2022-06-16 06:58:18 +02:00
dependabot[bot] 32a1ef9487 Bump @actions/core from 1.8.2 to 1.9.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-16 04:57:11 +00:00
Federico Builes 83be5f6c90 bumping version 2022-06-16 06:56:22 +02:00
Kenichi Kamiya 70f41926ca Fix duplicate words in README 2022-06-16 13:06:54 +09:00
Federico Builes 1c59cdf2a9 Fix the unknown licenses error message 2022-06-16 06:03:16 +02:00
dependabot[bot] ba0681f88b Bump @types/node from 17.0.43 to 18.0.0
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 17.0.43 to 18.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
2022-06-16 01:32:41 +00:00
Federico Builes 29fc7a23bd Merge pull request #117 from actions/readme-capitalisation
Fixing branding in the readme
2022-06-15 15:40:19 +02:00
Courtney Claessens 903977c63a branding! 2022-06-15 09:32:17 -04:00
16 changed files with 711 additions and 1312 deletions
+3
View File
@@ -9,3 +9,6 @@ updates:
directory: / directory: /
schedule: schedule:
interval: daily interval: daily
ignore:
- dependency-name: '@types/node'
update-types: ['version-update:semver-major']
+42
View File
@@ -0,0 +1,42 @@
name: CI
on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Test
run: |
npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Check format
run: |
npm run format-check
- name: Lint
run: |
npm run lint
+3
View File
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
+4
View File
@@ -0,0 +1,4 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
+2 -2
View File
@@ -102,8 +102,8 @@ minor/patch updates.
To do this just force-create a new annotated tag and push it: To do this just force-create a new annotated tag and push it:
``` ```
git tag -fa v1 -m "Updating v1 tag" git tag -fa v2 -m "Updating v2 to 2.3.4"
git push origin v1 --force git push origin v2 --force
``` ```
## Resources ## Resources
+2 -2
View File
@@ -2,7 +2,7 @@
This action scans your pull requests for dependency changes and will raise an error if any new dependencies have existing vulnerabilities. The action is supported by an [API endpoint](https://docs.github.com/en/rest/reference/dependency-graph#dependency-review) that diffs the dependencies between any two revisions. This action scans your pull requests for dependency changes and will raise an error if any new dependencies have existing vulnerabilities. The action is supported by an [API endpoint](https://docs.github.com/en/rest/reference/dependency-graph#dependency-review) that diffs the dependencies between any two revisions.
The action is available for all public repositories, as well as private repositories that have Github Advanced Security licensed. The action is available for all public repositories, as well as private repositories that have GitHub Advanced Security licensed.
<img width="854" alt="Screen Shot 2022-03-31 at 1 10 51 PM" src="https://user-images.githubusercontent.com/2161/161042286-b22d7dd3-13cb-458d-8744-ce70ed9bf562.png"> <img width="854" alt="Screen Shot 2022-03-31 at 1 10 51 PM" src="https://user-images.githubusercontent.com/2161/161042286-b22d7dd3-13cb-458d-8744-ce70ed9bf562.png">
@@ -52,7 +52,7 @@ jobs:
# Possible values: "critical", "high", "moderate", "low" # Possible values: "critical", "high", "moderate", "low"
# fail-on-severity: critical # fail-on-severity: critical
# #
# You can only can only include one of these two options: `allow-licenses` and `deny-licences` # You can only include one of these two options: `allow-licenses` and `deny-licenses`
# #
# Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses # Possible values: Any `spdx_id` value(s) from https://docs.github.com/en/rest/licenses
# allow-licenses: GPL-3.0, BSD-3-Clause, MIT # allow-licenses: GPL-3.0, BSD-3-Clause, MIT
+2 -2
View File
@@ -15,7 +15,7 @@ let npmChange: Change = {
{ {
severity: 'critical', severity: 'critical',
advisory_ghsa_id: 'first-random_string', advisory_ghsa_id: 'first-random_string',
advisory_summary: 'very dangerouns', advisory_summary: 'very dangerous',
advisory_url: 'github.com/future-funk' advisory_url: 'github.com/future-funk'
} }
] ]
@@ -34,7 +34,7 @@ let rubyChange: Change = {
{ {
severity: 'moderate', severity: 'moderate',
advisory_ghsa_id: 'second-random_string', advisory_ghsa_id: 'second-random_string',
advisory_summary: 'not so dangerouns', advisory_summary: 'not so dangerous',
advisory_url: 'github.com/future-funk' advisory_url: 'github.com/future-funk'
}, },
{ {
+30 -2
View File
@@ -15,7 +15,7 @@ let npmChange: Change = {
{ {
severity: 'critical', severity: 'critical',
advisory_ghsa_id: 'first-random_string', advisory_ghsa_id: 'first-random_string',
advisory_summary: 'very dangerouns', advisory_summary: 'very dangerous',
advisory_url: 'github.com/future-funk' advisory_url: 'github.com/future-funk'
} }
] ]
@@ -34,7 +34,7 @@ let rubyChange: Change = {
{ {
severity: 'moderate', severity: 'moderate',
advisory_ghsa_id: 'second-random_string', advisory_ghsa_id: 'second-random_string',
advisory_summary: 'not so dangerouns', advisory_summary: 'not so dangerous',
advisory_url: 'github.com/future-funk' advisory_url: 'github.com/future-funk'
}, },
{ {
@@ -68,3 +68,31 @@ test('it fails all license checks when allow is provided an empty array', async
}) })
expect(invalidChanges.length).toBe(2) expect(invalidChanges.length).toBe(2)
}) })
test('it does not fail if a license outside the allow list is found in removed changes', async () => {
const changes: Changes = [
{...npmChange, change_type: 'removed'},
{...rubyChange, change_type: 'removed'}
]
const [invalidChanges, _] = getDeniedLicenseChanges(changes, {allow: ['BSD']})
expect(invalidChanges).toStrictEqual([])
})
test('it does not fail if a license inside the deny list is found in removed changes', async () => {
const changes: Changes = [
{...npmChange, change_type: 'removed'},
{...rubyChange, change_type: 'removed'}
]
const [invalidChanges, _] = getDeniedLicenseChanges(changes, {deny: ['BSD']})
expect(invalidChanges).toStrictEqual([])
})
test('it fails if a license outside the allow list is found in both of added and removed changes', async () => {
const changes: Changes = [
{...npmChange, change_type: 'removed'},
npmChange,
{...rubyChange, change_type: 'removed'}
]
const [invalidChanges, _] = getDeniedLicenseChanges(changes, {allow: ['BSD']})
expect(invalidChanges).toStrictEqual([npmChange])
})
Generated Vendored
+344 -44
View File
@@ -81,11 +81,14 @@ exports.getDeniedLicenseChanges = void 0;
* @returns {[Array<Change>, Array<Change]} A tuple where the first element is the list of denied changes and the second one is the list of changes with unknown licenses * @returns {[Array<Change>, Array<Change]} A tuple where the first element is the list of denied changes and the second one is the list of changes with unknown licenses
*/ */
function getDeniedLicenseChanges(changes, licenses) { function getDeniedLicenseChanges(changes, licenses) {
let { allow, deny } = licenses; const { allow, deny } = licenses;
let disallowed = []; const disallowed = [];
let unknown = []; const unknown = [];
for (const change of changes) { for (const change of changes) {
let license = change.license; if (change.change_type === 'removed') {
continue;
}
const license = change.license;
if (license === null) { if (license === null) {
unknown.push(change); unknown.push(change);
continue; continue;
@@ -171,14 +174,14 @@ function run() {
baseRef: pull_request.base.sha, baseRef: pull_request.base.sha,
headRef: pull_request.head.sha headRef: pull_request.head.sha
}); });
let config = (0, config_1.readConfig)(); const config = (0, config_1.readConfig)();
let minSeverity = config.fail_on_severity; const minSeverity = config.fail_on_severity;
let failed = false; let failed = false;
let licenses = { const licenses = {
allow: config.allow_licenses, allow: config.allow_licenses,
deny: config.deny_licenses deny: config.deny_licenses
}; };
let filteredChanges = (0, filter_1.filterChangesBySeverity)(minSeverity, changes); const filteredChanges = (0, filter_1.filterChangesBySeverity)(minSeverity, changes);
for (const change of filteredChanges) { for (const change of filteredChanges) {
if (change.change_type === 'added' && if (change.change_type === 'added' &&
change.vulnerabilities !== undefined && change.vulnerabilities !== undefined &&
@@ -187,9 +190,9 @@ function run() {
failed = true; failed = true;
} }
} }
let [licenseErrors, unknownLicenses] = (0, licenses_1.getDeniedLicenseChanges)(changes, licenses); const [licenseErrors, unknownLicenses] = (0, licenses_1.getDeniedLicenseChanges)(changes, licenses);
if (licenseErrors.length > 0) { if (licenseErrors.length > 0) {
printLicensesError(licenseErrors, licenses); printLicensesError(licenseErrors);
core.setFailed('Dependency review detected incompatible licenses.'); core.setFailed('Dependency review detected incompatible licenses.');
} }
printNullLicenses(unknownLicenses); printNullLicenses(unknownLicenses);
@@ -233,17 +236,19 @@ function renderSeverity(severity) {
}[severity]; }[severity];
return `${ansi_styles_1.default.color[color].open}(${severity} severity)${ansi_styles_1.default.color[color].close}`; return `${ansi_styles_1.default.color[color].open}(${severity} severity)${ansi_styles_1.default.color[color].close}`;
} }
function printLicensesError(changes, licenses) { function printLicensesError(changes) {
if (changes.length == 0) { if (changes.length === 0) {
return; return;
} }
let { allow = [], deny = [] } = licenses;
core.info('\nThe following dependencies have incompatible licenses:\n'); core.info('\nThe following dependencies have incompatible licenses:\n');
for (const change of changes) { for (const change of changes) {
core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close} License: ${ansi_styles_1.default.color.red.open}${change.license}${ansi_styles_1.default.color.red.close}`); core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close} License: ${ansi_styles_1.default.color.red.open}${change.license}${ansi_styles_1.default.color.red.close}`);
} }
} }
function printNullLicenses(changes) { function printNullLicenses(changes) {
if (changes.length === 0) {
return;
}
core.info('\nWe could not detect a license for the following dependencies:\n'); core.info('\nWe could not detect a license for the following dependencies:\n');
for (const change of changes) { for (const change of changes) {
core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close}`); core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close}`);
@@ -317,7 +322,7 @@ exports.ConfigurationOptionsSchema = z
deny_licenses: z.array(z.string()).default([]) deny_licenses: z.array(z.string()).default([])
}) })
.partial() .partial()
.refine(obj => !(obj.allow_licenses && obj.deny_licenses), "Your workflow file has both an allow_licenses list and deny_licenses list, but you can only set one or the other."); .refine(obj => !(obj.allow_licenses && obj.deny_licenses), 'Your workflow file has both an allow_licenses list and deny_licenses list, but you can only set one or the other.');
exports.ChangesSchema = z.array(exports.ChangeSchema); exports.ChangesSchema = z.array(exports.ChangeSchema);
@@ -747,6 +752,13 @@ Object.defineProperty(exports, "summary", ({ enumerable: true, get: function ()
*/ */
var summary_2 = __nccwpck_require__(1327); var summary_2 = __nccwpck_require__(1327);
Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } }));
/**
* Path exports
*/
var path_utils_1 = __nccwpck_require__(2981);
Object.defineProperty(exports, "toPosixPath", ({ enumerable: true, get: function () { return path_utils_1.toPosixPath; } }));
Object.defineProperty(exports, "toWin32Path", ({ enumerable: true, get: function () { return path_utils_1.toWin32Path; } }));
Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: function () { return path_utils_1.toPlatformPath; } }));
//# sourceMappingURL=core.js.map //# sourceMappingURL=core.js.map
/***/ }), /***/ }),
@@ -884,6 +896,71 @@ exports.OidcClient = OidcClient;
/***/ }), /***/ }),
/***/ 2981:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;
const path = __importStar(__nccwpck_require__(1017));
/**
* toPosixPath converts the given path to the posix form. On Windows, \\ will be
* replaced with /.
*
* @param pth. Path to transform.
* @return string Posix path.
*/
function toPosixPath(pth) {
return pth.replace(/[\\]/g, '/');
}
exports.toPosixPath = toPosixPath;
/**
* toWin32Path converts the given path to the win32 form. On Linux, / will be
* replaced with \\.
*
* @param pth. Path to transform.
* @return string Win32 path.
*/
function toWin32Path(pth) {
return pth.replace(/[/]/g, '\\');
}
exports.toWin32Path = toWin32Path;
/**
* toPlatformPath converts the given path to a platform-specific path. It does
* this by replacing instances of / and \ with the platform-specific path
* separator.
*
* @param pth The path to platformize.
* @return string The platform-specific path.
*/
function toPlatformPath(pth) {
return pth.replace(/[/\\]/g, path.sep);
}
exports.toPlatformPath = toPlatformPath;
//# sourceMappingURL=path-utils.js.map
/***/ }),
/***/ 1327: /***/ 1327:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
@@ -4413,7 +4490,7 @@ var endpoint = __nccwpck_require__(9440);
var universalUserAgent = __nccwpck_require__(5030); var universalUserAgent = __nccwpck_require__(5030);
var isPlainObject = __nccwpck_require__(3287); var isPlainObject = __nccwpck_require__(3287);
var nodeFetch = _interopDefault(__nccwpck_require__(467)); var nodeFetch = _interopDefault(__nccwpck_require__(467));
var requestError = __nccwpck_require__(537); var requestError = __nccwpck_require__(13);
const VERSION = "5.6.3"; const VERSION = "5.6.3";
@@ -4582,6 +4659,88 @@ exports.request = request;
//# sourceMappingURL=index.js.map //# sourceMappingURL=index.js.map
/***/ }),
/***/ 13:
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var deprecation = __nccwpck_require__(8932);
var once = _interopDefault(__nccwpck_require__(1223));
const logOnceCode = once(deprecation => console.warn(deprecation));
const logOnceHeaders = once(deprecation => console.warn(deprecation));
/**
* Error with extra properties to help with debugging
*/
class RequestError extends Error {
constructor(message, statusCode, options) {
super(message); // Maintains proper stack trace (only available on V8)
/* istanbul ignore next */
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
this.name = "HttpError";
this.status = statusCode;
let headers;
if ("headers" in options && typeof options.headers !== "undefined") {
headers = options.headers;
}
if ("response" in options) {
this.response = options.response;
headers = options.response.headers;
} // redact request credentials without mutating original request options
const requestCopy = Object.assign({}, options.request);
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
});
}
requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit
// see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
this.request = requestCopy; // deprecations
Object.defineProperty(this, "code", {
get() {
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
return statusCode;
}
});
Object.defineProperty(this, "headers", {
get() {
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
return headers || {};
}
});
}
}
exports.RequestError = RequestError;
//# sourceMappingURL=index.js.map
/***/ }), /***/ }),
/***/ 3682: /***/ 3682:
@@ -10633,7 +10792,8 @@ function wrappy (fn, cb) {
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.setErrorMap = exports.overrideErrorMap = exports.defaultErrorMap = exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0; exports.getErrorMap = exports.setErrorMap = exports.defaultErrorMap = exports.ZodError = exports.quotelessJson = exports.ZodIssueCode = void 0;
const parseUtil_1 = __nccwpck_require__(888);
const util_1 = __nccwpck_require__(3985); const util_1 = __nccwpck_require__(3985);
exports.ZodIssueCode = util_1.util.arrayToEnum([ exports.ZodIssueCode = util_1.util.arrayToEnum([
"invalid_type", "invalid_type",
@@ -10734,7 +10894,7 @@ class ZodError extends Error {
return this.message; return this.message;
} }
get message() { get message() {
return JSON.stringify(this.issues, null, 2); return JSON.stringify(this.issues, parseUtil_1.jsonStringifyReplacer, 2);
} }
get isEmpty() { get isEmpty() {
return this.issues.length === 0; return this.issues.length === 0;
@@ -10774,7 +10934,7 @@ const defaultErrorMap = (issue, _ctx) => {
} }
break; break;
case exports.ZodIssueCode.invalid_literal: case exports.ZodIssueCode.invalid_literal:
message = `Invalid literal value, expected ${JSON.stringify(issue.expected)}`; message = `Invalid literal value, expected ${JSON.stringify(issue.expected, parseUtil_1.jsonStringifyReplacer)}`;
break; break;
case exports.ZodIssueCode.unrecognized_keys: case exports.ZodIssueCode.unrecognized_keys:
message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, ", ")}`; message = `Unrecognized key(s) in object: ${util_1.util.joinValues(issue.keys, ", ")}`;
@@ -10798,10 +10958,23 @@ const defaultErrorMap = (issue, _ctx) => {
message = `Invalid date`; message = `Invalid date`;
break; break;
case exports.ZodIssueCode.invalid_string: case exports.ZodIssueCode.invalid_string:
if (issue.validation !== "regex") if (typeof issue.validation === "object") {
if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
}
else if ("endsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.endsWith}"`;
}
else {
util_1.util.assertNever(issue.validation);
}
}
else if (issue.validation !== "regex") {
message = `Invalid ${issue.validation}`; message = `Invalid ${issue.validation}`;
else }
else {
message = "Invalid"; message = "Invalid";
}
break; break;
case exports.ZodIssueCode.too_small: case exports.ZodIssueCode.too_small:
if (issue.type === "array") if (issue.type === "array")
@@ -10810,6 +10983,8 @@ const defaultErrorMap = (issue, _ctx) => {
message = `String must contain ${issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`; message = `String must contain ${issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
else if (issue.type === "number") else if (issue.type === "number")
message = `Number must be greater than ${issue.inclusive ? `or equal to ` : ``}${issue.minimum}`; message = `Number must be greater than ${issue.inclusive ? `or equal to ` : ``}${issue.minimum}`;
else if (issue.type === "date")
message = `Date must be greater than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.minimum)}`;
else else
message = "Invalid input"; message = "Invalid input";
break; break;
@@ -10820,6 +10995,8 @@ const defaultErrorMap = (issue, _ctx) => {
message = `String must contain ${issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`; message = `String must contain ${issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
else if (issue.type === "number") else if (issue.type === "number")
message = `Number must be less than ${issue.inclusive ? `or equal to ` : ``}${issue.maximum}`; message = `Number must be less than ${issue.inclusive ? `or equal to ` : ``}${issue.maximum}`;
else if (issue.type === "date")
message = `Date must be smaller than ${issue.inclusive ? `or equal to ` : ``}${new Date(issue.maximum)}`;
else else
message = "Invalid input"; message = "Invalid input";
break; break;
@@ -10839,11 +11016,15 @@ const defaultErrorMap = (issue, _ctx) => {
return { message }; return { message };
}; };
exports.defaultErrorMap = defaultErrorMap; exports.defaultErrorMap = defaultErrorMap;
exports.overrideErrorMap = exports.defaultErrorMap; let overrideErrorMap = exports.defaultErrorMap;
const setErrorMap = (map) => { function setErrorMap(map) {
exports.overrideErrorMap = map; overrideErrorMap = map;
}; }
exports.setErrorMap = setErrorMap; exports.setErrorMap = setErrorMap;
function getErrorMap() {
return overrideErrorMap;
}
exports.getErrorMap = getErrorMap;
/***/ }), /***/ }),
@@ -10898,7 +11079,7 @@ var errorUtil;
"use strict"; "use strict";
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0; exports.jsonStringifyReplacer = exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;
const ZodError_1 = __nccwpck_require__(9892); const ZodError_1 = __nccwpck_require__(9892);
const makeIssue = (params) => { const makeIssue = (params) => {
const { data, path, errorMaps, issueData } = params; const { data, path, errorMaps, issueData } = params;
@@ -10931,7 +11112,7 @@ function addIssueToContext(ctx, issueData) {
errorMaps: [ errorMaps: [
ctx.common.contextualErrorMap, ctx.common.contextualErrorMap,
ctx.schemaErrorMap, ctx.schemaErrorMap,
ZodError_1.overrideErrorMap, ZodError_1.getErrorMap(),
ZodError_1.defaultErrorMap, ZodError_1.defaultErrorMap,
].filter((x) => !!x), ].filter((x) => !!x),
}); });
@@ -11006,6 +11187,13 @@ const isValid = (x) => x.status === "valid";
exports.isValid = isValid; exports.isValid = isValid;
const isAsync = (x) => typeof Promise !== undefined && x instanceof Promise; const isAsync = (x) => typeof Promise !== undefined && x instanceof Promise;
exports.isAsync = isAsync; exports.isAsync = isAsync;
const jsonStringifyReplacer = (_, value) => {
if (typeof value === "bigint") {
return value.toString();
}
return value;
};
exports.jsonStringifyReplacer = jsonStringifyReplacer;
/***/ }), /***/ }),
@@ -11029,6 +11217,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getParsedType = exports.ZodParsedType = exports.util = void 0; exports.getParsedType = exports.ZodParsedType = exports.util = void 0;
var util; var util;
(function (util) { (function (util) {
function assertEqual(_cond) { }
util.assertEqual = assertEqual;
function assertNever(_x) { function assertNever(_x) {
throw new Error(); throw new Error();
} }
@@ -11234,11 +11424,10 @@ function processCreateParams(params) {
const customMap = (iss, ctx) => { const customMap = (iss, ctx) => {
if (iss.code !== "invalid_type") if (iss.code !== "invalid_type")
return { message: ctx.defaultError }; return { message: ctx.defaultError };
if (typeof ctx.data === "undefined" && required_error) if (typeof ctx.data === "undefined") {
return { message: required_error }; return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };
if (params.invalid_type_error) }
return { message: params.invalid_type_error }; return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };
return { message: ctx.defaultError };
}; };
return { errorMap: customMap, description }; return { errorMap: customMap, description };
} }
@@ -11598,6 +11787,28 @@ class ZodString extends ZodType {
else if (check.kind === "trim") { else if (check.kind === "trim") {
input.data = input.data.trim(); input.data = input.data.trim();
} }
else if (check.kind === "startsWith") {
if (!input.data.startsWith(check.value)) {
ctx = this._getOrReturnCtx(input, ctx);
parseUtil_1.addIssueToContext(ctx, {
code: ZodError_1.ZodIssueCode.invalid_string,
validation: { startsWith: check.value },
message: check.message,
});
status.dirty();
}
}
else if (check.kind === "endsWith") {
if (!input.data.endsWith(check.value)) {
ctx = this._getOrReturnCtx(input, ctx);
parseUtil_1.addIssueToContext(ctx, {
code: ZodError_1.ZodIssueCode.invalid_string,
validation: { endsWith: check.value },
message: check.message,
});
status.dirty();
}
}
else { else {
util_1.util.assertNever(check); util_1.util.assertNever(check);
} }
@@ -11629,6 +11840,20 @@ class ZodString extends ZodType {
...errorUtil_1.errorUtil.errToObj(message), ...errorUtil_1.errorUtil.errToObj(message),
}); });
} }
startsWith(value, message) {
return this._addCheck({
kind: "startsWith",
value: value,
...errorUtil_1.errorUtil.errToObj(message),
});
}
endsWith(value, message) {
return this._addCheck({
kind: "endsWith",
value: value,
...errorUtil_1.errorUtil.errToObj(message),
});
}
min(minLength, message) { min(minLength, message) {
return this._addCheck({ return this._addCheck({
kind: "min", kind: "min",
@@ -11659,25 +11884,23 @@ class ZodString extends ZodType {
return !!this._def.checks.find((ch) => ch.kind === "cuid"); return !!this._def.checks.find((ch) => ch.kind === "cuid");
} }
get minLength() { get minLength() {
let min = -Infinity; let min = null;
this._def.checks.map((ch) => { for (const ch of this._def.checks) {
if (ch.kind === "min") { if (ch.kind === "min") {
if (min === null || ch.value > min) { if (min === null || ch.value > min)
min = ch.value; min = ch.value;
} }
} }
});
return min; return min;
} }
get maxLength() { get maxLength() {
let max = null; let max = null;
this._def.checks.map((ch) => { for (const ch of this._def.checks) {
if (ch.kind === "max") { if (ch.kind === "max") {
if (max === null || ch.value < max) { if (max === null || ch.value < max)
max = ch.value; max = ch.value;
} }
} }
});
return max; return max;
} }
} }
@@ -11952,15 +12175,89 @@ class ZodDate extends ZodType {
}); });
return parseUtil_1.INVALID; return parseUtil_1.INVALID;
} }
const status = new parseUtil_1.ParseStatus();
let ctx = undefined;
for (const check of this._def.checks) {
if (check.kind === "min") {
if (input.data.getTime() < check.value) {
ctx = this._getOrReturnCtx(input, ctx);
parseUtil_1.addIssueToContext(ctx, {
code: ZodError_1.ZodIssueCode.too_small,
message: check.message,
inclusive: true,
minimum: check.value,
type: "date",
});
status.dirty();
}
}
else if (check.kind === "max") {
if (input.data.getTime() > check.value) {
ctx = this._getOrReturnCtx(input, ctx);
parseUtil_1.addIssueToContext(ctx, {
code: ZodError_1.ZodIssueCode.too_big,
message: check.message,
inclusive: true,
maximum: check.value,
type: "date",
});
status.dirty();
}
}
else {
util_1.util.assertNever(check);
}
}
return { return {
status: "valid", status: status.value,
value: new Date(input.data.getTime()), value: new Date(input.data.getTime()),
}; };
} }
_addCheck(check) {
return new ZodDate({
...this._def,
checks: [...this._def.checks, check],
});
}
min(minDate, message) {
return this._addCheck({
kind: "min",
value: minDate.getTime(),
message: errorUtil_1.errorUtil.toString(message),
});
}
max(maxDate, message) {
return this._addCheck({
kind: "max",
value: maxDate.getTime(),
message: errorUtil_1.errorUtil.toString(message),
});
}
get minDate() {
let min = null;
for (const ch of this._def.checks) {
if (ch.kind === "min") {
if (min === null || ch.value > min)
min = ch.value;
}
}
return min != null ? new Date(min) : null;
}
get maxDate() {
let max = null;
for (const ch of this._def.checks) {
if (ch.kind === "max") {
if (max === null || ch.value < max)
max = ch.value;
}
}
return max != null ? new Date(max) : null;
}
} }
exports.ZodDate = ZodDate; exports.ZodDate = ZodDate;
ZodDate.create = (params) => { ZodDate.create = (params) => {
return new ZodDate({ return new ZodDate({
checks: [],
typeName: ZodFirstPartyTypeKind.ZodDate, typeName: ZodFirstPartyTypeKind.ZodDate,
...processCreateParams(params), ...processCreateParams(params),
}); });
@@ -12457,6 +12754,9 @@ class ZodObject extends ZodType {
shape: () => newShape, shape: () => newShape,
}); });
} }
keyof() {
return createZodEnum(util_1.util.objectKeys(this.shape));
}
} }
exports.ZodObject = ZodObject; exports.ZodObject = ZodObject;
ZodObject.create = (shape, params) => { ZodObject.create = (shape, params) => {
@@ -13052,7 +13352,7 @@ class ZodFunction extends ZodType {
errorMaps: [ errorMaps: [
ctx.common.contextualErrorMap, ctx.common.contextualErrorMap,
ctx.schemaErrorMap, ctx.schemaErrorMap,
ZodError_1.overrideErrorMap, ZodError_1.getErrorMap(),
ZodError_1.defaultErrorMap, ZodError_1.defaultErrorMap,
].filter((x) => !!x), ].filter((x) => !!x),
issueData: { issueData: {
@@ -13068,7 +13368,7 @@ class ZodFunction extends ZodType {
errorMaps: [ errorMaps: [
ctx.common.contextualErrorMap, ctx.common.contextualErrorMap,
ctx.schemaErrorMap, ctx.schemaErrorMap,
ZodError_1.overrideErrorMap, ZodError_1.getErrorMap(),
ZodError_1.defaultErrorMap, ZodError_1.defaultErrorMap,
].filter((x) => !!x), ].filter((x) => !!x),
issueData: { issueData: {
@@ -13739,13 +14039,13 @@ const schemas_1 = __nccwpck_require__(1129);
function filterChangesBySeverity(severity, changes) { function filterChangesBySeverity(severity, changes) {
const severityIdx = schemas_1.SEVERITIES.indexOf(severity); const severityIdx = schemas_1.SEVERITIES.indexOf(severity);
let filteredChanges = []; let filteredChanges = [];
for (let change of changes) { for (const change of changes) {
if (change === undefined || if (change === undefined ||
change.vulnerabilities === undefined || change.vulnerabilities === undefined ||
change.vulnerabilities.length === 0) { change.vulnerabilities.length === 0) {
continue; continue;
} }
let fChange = Object.assign(Object.assign({}, change), { vulnerabilities: change.vulnerabilities.filter(vuln => { const fChange = Object.assign(Object.assign({}, change), { vulnerabilities: change.vulnerabilities.filter(vuln => {
const vulnIdx = schemas_1.SEVERITIES.indexOf(vuln.severity); const vulnIdx = schemas_1.SEVERITIES.indexOf(vuln.severity);
if (vulnIdx <= severityIdx) { if (vulnIdx <= severityIdx) {
return true; return true;
@@ -13825,7 +14125,7 @@ exports.ConfigurationOptionsSchema = z
deny_licenses: z.array(z.string()).default([]) deny_licenses: z.array(z.string()).default([])
}) })
.partial() .partial()
.refine(obj => !(obj.allow_licenses && obj.deny_licenses), "Your workflow file has both an allow_licenses list and deny_licenses list, but you can only set one or the other."); .refine(obj => !(obj.allow_licenses && obj.deny_licenses), 'Your workflow file has both an allow_licenses list and deny_licenses list, but you can only set one or the other.');
exports.ChangesSchema = z.array(exports.ChangeSchema); exports.ChangesSchema = z.array(exports.ChangeSchema);
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+230 -1210
View File
File diff suppressed because it is too large Load Diff
+13 -13
View File
@@ -1,6 +1,6 @@
{ {
"name": "dependency-review-action", "name": "dependency-review-action",
"version": "2.0.1", "version": "2.0.4",
"private": true, "private": true,
"description": "A GitHub Action for Dependency Review", "description": "A GitHub Action for Dependency Review",
"main": "lib/main.js", "main": "lib/main.js",
@@ -25,30 +25,30 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.8.2", "@actions/core": "^1.9.0",
"@actions/github": "^5.0.3", "@actions/github": "^5.0.3",
"@octokit/plugin-retry": "^3.0.9", "@octokit/plugin-retry": "^3.0.9",
"@octokit/request-error": "^2.1.0", "@octokit/request-error": "^3.0.0",
"ansi-styles": "^6.1.0", "ansi-styles": "^6.1.0",
"got": "^12.1.0", "got": "^12.1.0",
"nodemon": "^2.0.16", "nodemon": "^2.0.19",
"yaml": "^2.1.1", "yaml": "^2.1.1",
"zod": "^3.17.3" "zod": "^3.17.9"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^17.0.43", "@types/node": "^16.11.45",
"@typescript-eslint/eslint-plugin": "^5.28.0", "@typescript-eslint/eslint-plugin": "^5.30.7",
"@typescript-eslint/parser": "^5.28.0", "@typescript-eslint/parser": "^5.30.7",
"@vercel/ncc": "^0.34.0", "@vercel/ncc": "^0.34.0",
"esbuild-register": "^3.3.3", "esbuild-register": "^3.3.3",
"eslint": "^8.17.0", "eslint": "^8.20.0",
"eslint-plugin-github": "^4.3.6", "eslint-plugin-github": "^4.3.6",
"eslint-plugin-jest": "^26.5.3", "eslint-plugin-jest": "^26.6.0",
"jest": "^27.5.1", "jest": "^27.5.1",
"js-yaml": "^4.1.0", "js-yaml": "^4.1.0",
"nodemon": "^2.0.16", "nodemon": "^2.0.19",
"prettier": "2.7.0", "prettier": "2.7.1",
"ts-jest": "^27.1.4", "ts-jest": "^27.1.4",
"typescript": "^4.7.3" "typescript": "^4.7.4"
} }
} }
+3 -4
View File
@@ -1,5 +1,4 @@
import {Changes} from './schemas' import {Changes, Severity, SEVERITIES} from './schemas'
import {Severity, SEVERITIES} from './schemas'
export function filterChangesBySeverity( export function filterChangesBySeverity(
severity: Severity, severity: Severity,
@@ -7,7 +6,7 @@ export function filterChangesBySeverity(
): Changes { ): Changes {
const severityIdx = SEVERITIES.indexOf(severity) const severityIdx = SEVERITIES.indexOf(severity)
let filteredChanges = [] let filteredChanges = []
for (let change of changes) { for (const change of changes) {
if ( if (
change === undefined || change === undefined ||
change.vulnerabilities === undefined || change.vulnerabilities === undefined ||
@@ -16,7 +15,7 @@ export function filterChangesBySeverity(
continue continue
} }
let fChange = { const fChange = {
...change, ...change,
vulnerabilities: change.vulnerabilities.filter(vuln => { vulnerabilities: change.vulnerabilities.filter(vuln => {
const vulnIdx = SEVERITIES.indexOf(vuln.severity) const vulnIdx = SEVERITIES.indexOf(vuln.severity)
+13 -9
View File
@@ -1,4 +1,4 @@
import {Change, ChangeSchema} from './schemas' import {Change} from './schemas'
/** /**
* Loops through a list of changes, filtering and returning the * Loops through a list of changes, filtering and returning the
@@ -13,19 +13,23 @@ import {Change, ChangeSchema} from './schemas'
* @returns {[Array<Change>, Array<Change]} A tuple where the first element is the list of denied changes and the second one is the list of changes with unknown licenses * @returns {[Array<Change>, Array<Change]} A tuple where the first element is the list of denied changes and the second one is the list of changes with unknown licenses
*/ */
export function getDeniedLicenseChanges( export function getDeniedLicenseChanges(
changes: Array<Change>, changes: Change[],
licenses: { licenses: {
allow?: Array<string> allow?: string[]
deny?: Array<string> deny?: string[]
} }
): [Array<Change>, Array<Change>] { ): [Change[], Change[]] {
let {allow, deny} = licenses const {allow, deny} = licenses
let disallowed: Change[] = [] const disallowed: Change[] = []
let unknown: Change[] = [] const unknown: Change[] = []
for (const change of changes) { for (const change of changes) {
let license = change.license if (change.change_type === 'removed') {
continue
}
const license = change.license
if (license === null) { if (license === null) {
unknown.push(change) unknown.push(change)
continue continue
+14 -18
View File
@@ -27,16 +27,16 @@ async function run(): Promise<void> {
headRef: pull_request.head.sha headRef: pull_request.head.sha
}) })
let config = readConfig() const config = readConfig()
let minSeverity = config.fail_on_severity const minSeverity = config.fail_on_severity
let failed = false let failed = false
let licenses = { const licenses = {
allow: config.allow_licenses, allow: config.allow_licenses,
deny: config.deny_licenses deny: config.deny_licenses
} }
let filteredChanges = filterChangesBySeverity( const filteredChanges = filterChangesBySeverity(
minSeverity as Severity, minSeverity as Severity,
changes changes
) )
@@ -52,13 +52,13 @@ async function run(): Promise<void> {
} }
} }
let [licenseErrors, unknownLicenses] = getDeniedLicenseChanges( const [licenseErrors, unknownLicenses] = getDeniedLicenseChanges(
changes, changes,
licenses licenses
) )
if (licenseErrors.length > 0) { if (licenseErrors.length > 0) {
printLicensesError(licenseErrors, licenses) printLicensesError(licenseErrors)
core.setFailed('Dependency review detected incompatible licenses.') core.setFailed('Dependency review detected incompatible licenses.')
} }
@@ -90,7 +90,7 @@ async function run(): Promise<void> {
} }
} }
function printChangeVulnerabilities(change: Change) { function printChangeVulnerabilities(change: Change): void {
for (const vuln of change.vulnerabilities) { for (const vuln of change.vulnerabilities) {
core.info( core.info(
`${styles.bold.open}${change.manifest} » ${change.name}@${ `${styles.bold.open}${change.manifest} » ${change.name}@${
@@ -117,19 +117,11 @@ function renderSeverity(
return `${styles.color[color].open}(${severity} severity)${styles.color[color].close}` return `${styles.color[color].open}(${severity} severity)${styles.color[color].close}`
} }
function printLicensesError( function printLicensesError(changes: Change[]): void {
changes: Array<Change>, if (changes.length === 0) {
licenses: {
allow?: Array<string>
deny?: Array<string>
}
): void {
if (changes.length == 0) {
return return
} }
let {allow = [], deny = []} = licenses
core.info('\nThe following dependencies have incompatible licenses:\n') core.info('\nThe following dependencies have incompatible licenses:\n')
for (const change of changes) { for (const change of changes) {
core.info( core.info(
@@ -138,7 +130,11 @@ function printLicensesError(
} }
} }
function printNullLicenses(changes: Array<Change>): void { function printNullLicenses(changes: Change[]): void {
if (changes.length === 0) {
return
}
core.info('\nWe could not detect a license for the following dependencies:\n') core.info('\nWe could not detect a license for the following dependencies:\n')
for (const change of changes) { for (const change of changes) {
core.info( core.info(
+1 -1
View File
@@ -39,7 +39,7 @@ export const ConfigurationOptionsSchema = z
.partial() .partial()
.refine( .refine(
obj => !(obj.allow_licenses && obj.deny_licenses), obj => !(obj.allow_licenses && obj.deny_licenses),
"Your workflow file has both an allow_licenses list and deny_licenses list, but you can only set one or the other." 'Your workflow file has both an allow_licenses list and deny_licenses list, but you can only set one or the other.'
) )
export const ChangesSchema = z.array(ChangeSchema) export const ChangesSchema = z.array(ChangeSchema)