From 58879f56b9baa751a0abcbcff8cf83fedc86a12f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 20:27:55 +0000 Subject: [PATCH 1/3] build(deps): bump semver from 7.6.2 to 7.6.3 Bumps [semver](https://github.com/npm/node-semver) from 7.6.2 to 7.6.3. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v7.6.2...v7.6.3) --- updated-dependencies: - dependency-name: semver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 444a166c..2eff3287 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@actions/tool-cache": "^2.0.1", - "semver": "^7.6.2", + "semver": "^7.6.3", "typed-rest-client": "^2.0.2" }, "devDependencies": { @@ -8726,9 +8726,9 @@ "dev": true }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "bin": { "semver": "bin/semver.js" }, @@ -16248,9 +16248,9 @@ "dev": true }, "semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==" + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==" }, "shebang-command": { "version": "2.0.0", diff --git a/package.json b/package.json index 7804b86e..4006d27c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dependencies": { "@actions/core": "^1.10.1", "@actions/tool-cache": "^2.0.1", - "semver": "^7.6.2", + "semver": "^7.6.3", "typed-rest-client": "^2.0.2" }, "devDependencies": { From f39f1c77c5b2d5b31c130a4a70322fb67c0d5878 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 1 Aug 2024 13:38:17 -0700 Subject: [PATCH 2/3] Update dependency license metadata cache for `semver` bump --- .licenses/npm/{semver-7.6.2.dep.yml => semver-7.6.3.dep.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .licenses/npm/{semver-7.6.2.dep.yml => semver-7.6.3.dep.yml} (98%) diff --git a/.licenses/npm/semver-7.6.2.dep.yml b/.licenses/npm/semver-7.6.3.dep.yml similarity index 98% rename from .licenses/npm/semver-7.6.2.dep.yml rename to .licenses/npm/semver-7.6.3.dep.yml index 3a2ee35e..c4ee3541 100644 --- a/.licenses/npm/semver-7.6.2.dep.yml +++ b/.licenses/npm/semver-7.6.3.dep.yml @@ -1,6 +1,6 @@ --- name: semver -version: 7.6.2 +version: 7.6.3 type: npm summary: The semantic version parser used by npm. homepage: From 3764cfd01ae9d9937d6749608770718858792a5e Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 1 Aug 2024 13:39:13 -0700 Subject: [PATCH 3/3] Repackage action following `semver` bump GitHub downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like run to interact with the runner machine. This means that we must provide all JavaScript package dependencies as part of the distributed action in order for it to be usable in workflows. A naive approach to doing this is checking in the `node_modules` folder. However, this approach results in a huge amount of frequently changing external content being included in the repository, much of which is not even part of the executed program. A far better approach is to use the excellent ncc tool to compile the program, including all the relevant code from the dependencies, into a single file. We use a "continuous packaging" approach, where the packaged action code that is generated via ncc is always kept in sync with the development source code and dependencies. This allows a beta version of the action to be easily used in workflows by beta testers or those who need changes not in the release simply by using the name of the branch as the action ref (e.g., `uses: arduino/arduino-lint-action@main` will cause the version of the action from the tip of the `main` branch to be used by the workflow run). The update of the package dependency results in a change to the packaged code, so the packaging is here updated accordingly. --- dist/index.js | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/dist/index.js b/dist/index.js index cea09857..a8b9836f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8666,6 +8666,8 @@ const Range = __nccwpck_require__(9828) /***/ 9828: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const SPACE_CHARACTERS = /\s+/g + // hoisted class for cyclic dependency class Range { constructor (range, options) { @@ -8686,7 +8688,7 @@ class Range { // just put it in the set and return this.raw = range.value this.set = [[range]] - this.format() + this.formatted = undefined return this } @@ -8697,10 +8699,7 @@ class Range { // First reduce all whitespace as much as possible so we do not have to rely // on potentially slow regexes like \s*. This is then stored and used for // future error messages as well. - this.raw = range - .trim() - .split(/\s+/) - .join(' ') + this.raw = range.trim().replace(SPACE_CHARACTERS, ' ') // First, split on || this.set = this.raw @@ -8734,14 +8733,29 @@ class Range { } } - this.format() + this.formatted = undefined + } + + get range () { + if (this.formatted === undefined) { + this.formatted = '' + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += '||' + } + const comps = this.set[i] + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += ' ' + } + this.formatted += comps[k].toString().trim() + } + } + } + return this.formatted } format () { - this.range = this.set - .map((comps) => comps.join(' ').trim()) - .join('||') - .trim() return this.range }