From 647615d9380f38168fcfab258b69ef4b9ec0e2e8 Mon Sep 17 00:00:00 2001 From: Nikita Galaiko Date: Tue, 3 Sep 2024 08:28:34 +0200 Subject: [PATCH] chore: configure semantic-release --- .releaserc.cjs | 2 +- .sage/main.go | 2 +- README.md | 6 ++ package.json | 7 +- yarn.lock | 231 +++++++------------------------------------------ 5 files changed, 41 insertions(+), 207 deletions(-) diff --git a/.releaserc.cjs b/.releaserc.cjs index 1882e18..9ca433d 100644 --- a/.releaserc.cjs +++ b/.releaserc.cjs @@ -15,7 +15,7 @@ module.exports = { }, ], "@semantic-release/github", - "semantic-release-yarn", + "@semantic-release/npm", [ "@semantic-release/release-notes-generator", { diff --git a/.sage/main.go b/.sage/main.go index f6fd63b..524cf03 100644 --- a/.sage/main.go +++ b/.sage/main.go @@ -92,6 +92,6 @@ func GitVerifyNoDiff(ctx context.Context) error { func Release(ctx context.Context) error { sg.Logger(ctx).Println("releasing...") sg.Deps(ctx, InstallImmutable) - cmd := sg.Command(ctx, "yarn", "semantic-release", "--ci") + cmd := sg.Command(ctx, "yarn", "semantic-release") return cmd.Run() } diff --git a/README.md b/README.md index 1146c53..6e0e14b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,12 @@ A command line tool that wraps [csp-evaluator]. +## Installation + +``` +$ npm install -g @einride/csp-evaluator-cli +``` + ## Usage CLI interface strives to mimic [CSP Evaluator online tool]. It takes Content Security Policy as a string, diff --git a/package.json b/package.json index 26de0ad..a5ada4f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@saga/csp-evaluator-cli", + "name": "@einride/csp-evaluator-cli", "version": "0.0.0-development", "description": "A command line tool to validate Content-Security-Policy rules", "main": "src/index.js", @@ -25,7 +25,8 @@ "content-security-policy" ], "publishConfig": { - "registry": "https://europe-west1-npm.pkg.dev/e-npm-registry-prod/npm" + "access": "public", + "provenance": true }, "dependencies": { "chalk": "^5.3.0", @@ -38,12 +39,10 @@ "@einride/eslint-plugin": "7.9.0", "@einride/prettier-config": "^2.1.0", "@einride/tsconfig": "^2.1.1", - "concurrently": "8.2.2", "conventional-changelog-conventionalcommits": "^8.0.0", "eslint": "8.57.0", "prettier": "3.3.3", "semantic-release": "^24.0.0", - "semantic-release-yarn": "^3.0.2", "typescript": "^5.5.4" }, "packageManager": "yarn@3.5.0" diff --git a/yarn.lock b/yarn.lock index 0c8e31c..2f3f741 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,7 +5,7 @@ __metadata: version: 6 cacheKey: 8 -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.21.4, @babel/code-frame@npm:^7.22.13": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.22.13": version: 7.24.7 resolution: "@babel/code-frame@npm:7.24.7" dependencies: @@ -34,15 +34,6 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.21.0": - version: 7.25.6 - resolution: "@babel/runtime@npm:7.25.6" - dependencies: - regenerator-runtime: ^0.14.0 - checksum: ee1a69d3ac7802803f5ee6a96e652b78b8addc28c6a38c725a4ad7d61a059d9e6cb9f6550ed2f63cce67a1bd82e0b1ef66a1079d895be6bfb536a5cfbd9ccc32 - languageName: node - linkType: hard - "@babel/runtime@npm:^7.23.2": version: 7.24.8 resolution: "@babel/runtime@npm:7.24.8" @@ -251,6 +242,28 @@ __metadata: languageName: node linkType: hard +"@einride/csp-evaluator-cli@workspace:.": + version: 0.0.0-use.local + resolution: "@einride/csp-evaluator-cli@workspace:." + dependencies: + "@commitlint/cli": 19.4.1 + "@commitlint/config-conventional": 19.4.1 + "@einride/eslint-plugin": 7.9.0 + "@einride/prettier-config": ^2.1.0 + "@einride/tsconfig": ^2.1.1 + chalk: ^5.3.0 + commander: ^12.1.0 + conventional-changelog-conventionalcommits: ^8.0.0 + csp_evaluator: ^1.1.2 + eslint: 8.57.0 + prettier: 3.3.3 + semantic-release: ^24.0.0 + typescript: ^5.5.4 + bin: + csp: src/index.js + languageName: unknown + linkType: soft + "@einride/eslint-plugin@npm:7.9.0": version: 7.9.0 resolution: "@einride/eslint-plugin@npm:7.9.0" @@ -767,30 +780,6 @@ __metadata: languageName: node linkType: hard -"@saga/csp-evaluator-cli@workspace:.": - version: 0.0.0-use.local - resolution: "@saga/csp-evaluator-cli@workspace:." - dependencies: - "@commitlint/cli": 19.4.1 - "@commitlint/config-conventional": 19.4.1 - "@einride/eslint-plugin": 7.9.0 - "@einride/prettier-config": ^2.1.0 - "@einride/tsconfig": ^2.1.1 - chalk: ^5.3.0 - commander: ^12.1.0 - concurrently: 8.2.2 - conventional-changelog-conventionalcommits: ^8.0.0 - csp_evaluator: ^1.1.2 - eslint: 8.57.0 - prettier: 3.3.3 - semantic-release: ^24.0.0 - semantic-release-yarn: ^3.0.2 - typescript: ^5.5.4 - bin: - csp: src/index.js - languageName: unknown - linkType: soft - "@sec-ant/readable-stream@npm:^0.4.1": version: 0.4.1 resolution: "@sec-ant/readable-stream@npm:0.4.1" @@ -1020,7 +1009,7 @@ __metadata: languageName: node linkType: hard -"@types/normalize-package-data@npm:^2.4.1, @types/normalize-package-data@npm:^2.4.3": +"@types/normalize-package-data@npm:^2.4.3": version: 2.4.4 resolution: "@types/normalize-package-data@npm:2.4.4" checksum: 65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 @@ -1600,7 +1589,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.2": +"chalk@npm:^4.0.0": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -1794,26 +1783,6 @@ __metadata: languageName: node linkType: hard -"concurrently@npm:8.2.2": - version: 8.2.2 - resolution: "concurrently@npm:8.2.2" - dependencies: - chalk: ^4.1.2 - date-fns: ^2.30.0 - lodash: ^4.17.21 - rxjs: ^7.8.1 - shell-quote: ^1.8.1 - spawn-command: 0.0.2 - supports-color: ^8.1.1 - tree-kill: ^1.2.2 - yargs: ^17.7.2 - bin: - conc: dist/bin/concurrently.js - concurrently: dist/bin/concurrently.js - checksum: 8ac774df06869773438f1bf91025180c52d5b53139bc86cf47659136c0d97461d0579c515d848d1e945d4e3e0cafe646b2ea18af8d74259b46abddcfe39b2c6c - languageName: node - linkType: hard - "config-chain@npm:^1.1.11": version: 1.1.13 resolution: "config-chain@npm:1.1.13" @@ -1941,23 +1910,6 @@ __metadata: languageName: node linkType: hard -"cosmiconfig@npm:^8.1.0": - version: 8.3.6 - resolution: "cosmiconfig@npm:8.3.6" - dependencies: - import-fresh: ^3.3.0 - js-yaml: ^4.1.0 - parse-json: ^5.2.0 - path-type: ^4.0.0 - peerDependencies: - typescript: ">=4.9.5" - peerDependenciesMeta: - typescript: - optional: true - checksum: dc339ebea427898c9e03bf01b56ba7afbac07fc7d2a2d5a15d6e9c14de98275a9565da949375aee1809591c152c0a3877bb86dbeaf74d5bd5aaa79955ad9e7a0 - languageName: node - linkType: hard - "cosmiconfig@npm:^9.0.0": version: 9.0.0 resolution: "cosmiconfig@npm:9.0.0" @@ -2058,15 +2010,6 @@ __metadata: languageName: node linkType: hard -"date-fns@npm:^2.30.0": - version: 2.30.0 - resolution: "date-fns@npm:2.30.0" - dependencies: - "@babel/runtime": ^7.21.0 - checksum: f7be01523282e9bb06c0cd2693d34f245247a29098527d4420628966a2d9aad154bd0e90a6b1cf66d37adcb769cd108cf8a7bd49d76db0fb119af5cdd13644f4 - languageName: node - linkType: hard - "debug@npm:4, debug@npm:^4.0.0": version: 4.3.6 resolution: "debug@npm:4.3.6" @@ -2263,7 +2206,7 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.3.1, error-ex@npm:^1.3.2": +"error-ex@npm:^1.3.1": version: 1.3.2 resolution: "error-ex@npm:1.3.2" dependencies: @@ -2966,7 +2909,7 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.0": +"fs-extra@npm:^11.0.0": version: 11.2.0 resolution: "fs-extra@npm:11.2.0" dependencies: @@ -4265,13 +4208,6 @@ __metadata: languageName: node linkType: hard -"lines-and-columns@npm:^2.0.3": - version: 2.0.4 - resolution: "lines-and-columns@npm:2.0.4" - checksum: f5e3e207467d3e722280c962b786dc20ebceb191821dcd771d14ab3146b6744cae28cf305ee4638805bec524ac54800e15698c853fcc53243821f88df37e4975 - languageName: node - linkType: hard - "load-json-file@npm:^4.0.0": version: 4.0.0 resolution: "load-json-file@npm:4.0.0" @@ -4410,13 +4346,6 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.21": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 - languageName: node - linkType: hard - "loose-envify@npm:^1.4.0": version: 1.4.0 resolution: "loose-envify@npm:1.4.0" @@ -5272,19 +5201,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^7.0.0": - version: 7.1.1 - resolution: "parse-json@npm:7.1.1" - dependencies: - "@babel/code-frame": ^7.21.4 - error-ex: ^1.3.2 - json-parse-even-better-errors: ^3.0.0 - lines-and-columns: ^2.0.3 - type-fest: ^3.8.0 - checksum: 187275c7ac097dcfb3c7420bca2399caa4da33bcd5d5aac3604bda0e2b8eee4df61cc26aa0d79fab97f0d67bf42d41d332baa9f9f56ad27636ad785f1ae639e5 - languageName: node - linkType: hard - "parse-json@npm:^8.0.0": version: 8.1.0 resolution: "parse-json@npm:8.1.0" @@ -5632,18 +5548,6 @@ __metadata: languageName: node linkType: hard -"read-pkg@npm:^8.0.0": - version: 8.1.0 - resolution: "read-pkg@npm:8.1.0" - dependencies: - "@types/normalize-package-data": ^2.4.1 - normalize-package-data: ^6.0.0 - parse-json: ^7.0.0 - type-fest: ^4.2.0 - checksum: f4cd164f096e78cf3e338a55f800043524e3055f9b0b826143290002fafc951025fc3cbd6ca683ebaf7945efcfb092d31c683dd252a7871a974662985c723b67 - languageName: node - linkType: hard - "read-pkg@npm:^9.0.0": version: 9.0.1 resolution: "read-pkg@npm:9.0.1" @@ -5838,15 +5742,6 @@ __metadata: languageName: node linkType: hard -"rxjs@npm:^7.8.1": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" - dependencies: - tslib: ^2.1.0 - checksum: de4b53db1063e618ec2eca0f7965d9137cabe98cf6be9272efe6c86b47c17b987383df8574861bcced18ebd590764125a901d5506082be84a8b8e364bf05f119 - languageName: node - linkType: hard - "safe-array-concat@npm:^1.1.2": version: 1.1.2 resolution: "safe-array-concat@npm:1.1.2" @@ -5884,26 +5779,6 @@ __metadata: languageName: node linkType: hard -"semantic-release-yarn@npm:^3.0.2": - version: 3.0.2 - resolution: "semantic-release-yarn@npm:3.0.2" - dependencies: - "@semantic-release/error": ^4.0.0 - aggregate-error: ^5.0.0 - cosmiconfig: ^8.1.0 - execa: ^8.0.1 - fs-extra: ^11.1.0 - js-yaml: ^4.1.0 - lodash: ^4.17.21 - nerf-dart: ^1.0.0 - read-pkg: ^8.0.0 - semver: ^7.3.8 - peerDependencies: - semantic-release: ">=19.0.0" - checksum: ac89435f10891dc628e64422332871ede232428788470a0e086c92882b38d90122c0b3af353c28b4af3aeb6f2b4916429386fa0ce00abe4f803facad4c2313dd - languageName: node - linkType: hard - "semantic-release@npm:^24.0.0": version: 24.0.0 resolution: "semantic-release@npm:24.0.0" @@ -5968,7 +5843,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2": +"semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.2": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -6019,13 +5894,6 @@ __metadata: languageName: node linkType: hard -"shell-quote@npm:^1.8.1": - version: 1.8.1 - resolution: "shell-quote@npm:1.8.1" - checksum: 5f01201f4ef504d4c6a9d0d283fa17075f6770bfbe4c5850b074974c68062f37929ca61700d95ad2ac8822e14e8c4b990ca0e6e9272e64befd74ce5e19f0736b - languageName: node - linkType: hard - "side-channel@npm:^1.0.4, side-channel@npm:^1.0.6": version: 1.0.6 resolution: "side-channel@npm:1.0.6" @@ -6128,13 +5996,6 @@ __metadata: languageName: node linkType: hard -"spawn-command@npm:0.0.2": - version: 0.0.2 - resolution: "spawn-command@npm:0.0.2" - checksum: e35c5d28177b4d461d33c88cc11f6f3a5079e2b132c11e1746453bbb7a0c0b8a634f07541a2a234fa4758239d88203b758def509161b651e81958894c0b4b64b - languageName: node - linkType: hard - "spawn-error-forwarder@npm:~1.0.0": version: 1.0.0 resolution: "spawn-error-forwarder@npm:1.0.0" @@ -6394,15 +6255,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^8.1.1": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: ^4.0.0 - checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 - languageName: node - linkType: hard - "supports-color@npm:^9.4.0": version: 9.4.0 resolution: "supports-color@npm:9.4.0" @@ -6551,15 +6403,6 @@ __metadata: languageName: node linkType: hard -"tree-kill@npm:^1.2.2": - version: 1.2.2 - resolution: "tree-kill@npm:1.2.2" - bin: - tree-kill: cli.js - checksum: 49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 - languageName: node - linkType: hard - "treeverse@npm:^3.0.0": version: 3.0.0 resolution: "treeverse@npm:3.0.0" @@ -6595,13 +6438,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.1.0": - version: 2.7.0 - resolution: "tslib@npm:2.7.0" - checksum: 1606d5c89f88d466889def78653f3aab0f88692e80bb2066d090ca6112ae250ec1cfa9dbfaab0d17b60da15a4186e8ec4d893801c67896b277c17374e36e1d28 - languageName: node - linkType: hard - "tslib@npm:^2.3.1, tslib@npm:^2.6.2": version: 2.6.3 resolution: "tslib@npm:2.6.3" @@ -6661,14 +6497,7 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^3.8.0": - version: 3.13.1 - resolution: "type-fest@npm:3.13.1" - checksum: c06b0901d54391dc46de3802375f5579868949d71f93b425ce564e19a428a0d411ae8d8cb0e300d330071d86152c3ea86e744c3f2860a42a79585b6ec2fdae8e - languageName: node - linkType: hard - -"type-fest@npm:^4.2.0, type-fest@npm:^4.6.0, type-fest@npm:^4.7.1": +"type-fest@npm:^4.6.0, type-fest@npm:^4.7.1": version: 4.23.0 resolution: "type-fest@npm:4.23.0" checksum: 75466563be2d3d116a0b70ffe76a7f72947e3350ceacbc8509a7d841670dddc2fbb008109f0307888137794cf25681fd50f65bf8873bcdc17bc7ac8912c70114 @@ -7060,7 +6889,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^17.0.0, yargs@npm:^17.5.1, yargs@npm:^17.7.2": +"yargs@npm:^17.0.0, yargs@npm:^17.5.1": version: 17.7.2 resolution: "yargs@npm:17.7.2" dependencies: