From 2c593940aac8f867b9ac52e40e11284d180c32e8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 16 Mar 2023 12:02:04 +0000 Subject: [PATCH 01/15] Bump actions/setup-go from 3 to 4 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build.yml | 2 +- .github/workflows/check-go-dependencies-task.yml | 4 ++-- .github/workflows/check-go-task.yml | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9440254..15f0029 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: '1.18.3' diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index ab9104d..8ad839b 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -76,7 +76,7 @@ jobs: version: 3.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -126,7 +126,7 @@ jobs: version: 3.x - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index 844629e..fb20c58 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -70,7 +70,7 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -103,7 +103,7 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -139,7 +139,7 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -175,7 +175,7 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} @@ -211,7 +211,7 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: go-version: ${{ env.GO_VERSION }} From 77013c96ed74dfe1bbca79617424f96e0c779a2c Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Mon, 15 May 2023 18:10:22 +0200 Subject: [PATCH 02/15] Sync check-go-dependencies-task with upstream template --- .github/workflows/check-go-dependencies-task.yml | 14 +++++++++++++- Taskfile.yml | 10 +++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-go-dependencies-task.yml b/.github/workflows/check-go-dependencies-task.yml index 8ad839b..fef70f2 100644 --- a/.github/workflows/check-go-dependencies-task.yml +++ b/.github/workflows/check-go-dependencies-task.yml @@ -56,7 +56,7 @@ jobs: RESULT="false" fi - echo "::set-output name=result::$RESULT" + echo "result=$RESULT" >> $GITHUB_OUTPUT check-cache: needs: run-determination @@ -69,6 +69,12 @@ jobs: with: submodules: recursive + # This is required to allow jonabc/setup-licensed to install licensed via Ruby gem. + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby # Install latest version + - name: Install licensed uses: jonabc/setup-licensed@v1 with: @@ -119,6 +125,12 @@ jobs: with: submodules: recursive + # This is required to allow jonabc/setup-licensed to install licensed via Ruby gem. + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ruby # Install latest version + - name: Install licensed uses: jonabc/setup-licensed@v1 with: diff --git a/Taskfile.yml b/Taskfile.yml index a1f5f62..0d77c33 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -45,9 +45,16 @@ tasks: docs:generate: desc: Create all generated documentation content + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-dependencies-task/Taskfile.yml + general:prepare-deps: + desc: Prepare project dependencies for license check + # No preparation is needed for Go module-based projects. + # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-dependencies-task/Taskfile.yml general:cache-dep-licenses: desc: Cache dependency license metadata + deps: + - task: general:prepare-deps cmds: - | if ! which licensed &>/dev/null; then @@ -55,7 +62,8 @@ tasks: echo "Licensed does not have Windows support." echo "Please use Linux/macOS or download the dependencies cache from the GitHub Actions workflow artifact." else - echo "licensed not found or not in PATH. Please install: https://github.com/github/licensed#as-an-executable" + echo "licensed not found or not in PATH." + echo "Please install: https://github.com/github/licensed#as-an-executable" fi exit 1 fi From 9328f31ffd493c1e871d5747ddf102d01f8e586f Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Mon, 15 May 2023 18:16:02 +0200 Subject: [PATCH 03/15] Sync check-go-task with upstream template --- .github/workflows/check-go-task.yml | 2 +- Taskfile.yml | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-go-task.yml b/.github/workflows/check-go-task.yml index fb20c58..f320fd8 100644 --- a/.github/workflows/check-go-task.yml +++ b/.github/workflows/check-go-task.yml @@ -50,7 +50,7 @@ jobs: RESULT="false" fi - echo "::set-output name=result::$RESULT" + echo "result=$RESULT" >> $GITHUB_OUTPUT check-errors: name: check-errors (${{ matrix.module.path }}) diff --git a/Taskfile.yml b/Taskfile.yml index 0d77c33..14df037 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -10,7 +10,11 @@ vars: DEFAULT_GO_MODULE_PATH: ./ DEFAULT_GO_PACKAGES: sh: | - echo $(cd {{default "./" .GO_MODULE_PATH}} && go list ./... | tr '\n' ' ' || echo '"ERROR: Unable to discover Go packages"') + echo $( + cd {{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}} && + go list ./... | tr '\n' ' ' || + echo '"ERROR: Unable to discover Go packages"' + ) # build vars COMMIT: sh: echo "$(git log --no-show-signature -n 1 --format=%h)" @@ -86,7 +90,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml go:build: desc: Build the Go code - dir: '{{default "./" .GO_MODULE_PATH}}' + dir: "{{.DEFAULT_GO_MODULE_PATH}}" cmds: - go build -v {{.LDFLAGS}} @@ -103,21 +107,21 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml go:fix: desc: Modernize usages of outdated APIs - dir: '{{default "./" .GO_MODULE_PATH}}' + dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}" cmds: - go fix {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}} # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml go:format: desc: Format Go code - dir: '{{default "./" .GO_MODULE_PATH}}' + dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}" cmds: - go fmt {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}} # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml go:lint: desc: Lint Go code - dir: '{{default "./" .GO_MODULE_PATH}}' + dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}" cmds: - | if ! which golint &>/dev/null; then @@ -156,7 +160,7 @@ tasks: # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-go-task/Taskfile.yml go:vet: desc: Check for errors in Go code - dir: '{{default "./" .GO_MODULE_PATH}}' + dir: "{{default .DEFAULT_GO_MODULE_PATH .GO_MODULE_PATH}}" cmds: - go vet {{default .DEFAULT_GO_PACKAGES .GO_PACKAGES}} From eb01e486c5f3402d84251ffe7dae68e14840b03d Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Tue, 16 May 2023 08:52:46 +0200 Subject: [PATCH 04/15] Sync check-license with upstream template --- .github/workflows/check-license.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-license.yml b/.github/workflows/check-license.yml index 79baf0c..ee9362b 100644 --- a/.github/workflows/check-license.yml +++ b/.github/workflows/check-license.yml @@ -54,7 +54,7 @@ jobs: RESULT="false" fi - echo "::set-output name=result::$RESULT" + echo "result=$RESULT" >> $GITHUB_OUTPUT check-license: needs: run-determination From 399e80eb62b0cdb4bc7c54647626dbe1e56e07e3 Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Tue, 16 May 2023 09:04:23 +0200 Subject: [PATCH 05/15] Sync check-markdown-task with upstream template --- .github/workflows/check-markdown-task.yml | 2 +- Taskfile.yml | 3 +- package-lock.json | 450 ++++++++-------------- package.json | 4 +- 4 files changed, 174 insertions(+), 285 deletions(-) diff --git a/.github/workflows/check-markdown-task.yml b/.github/workflows/check-markdown-task.yml index 9b53c3a..a2001a8 100644 --- a/.github/workflows/check-markdown-task.yml +++ b/.github/workflows/check-markdown-task.yml @@ -60,7 +60,7 @@ jobs: RESULT="false" fi - echo "::set-output name=result::$RESULT" + echo "result=$RESULT" >> $GITHUB_OUTPUT lint: needs: run-determination diff --git a/Taskfile.yml b/Taskfile.yml index 14df037..1722e23 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -176,7 +176,8 @@ tasks: # npx --call uses the native shell, which makes it too difficult to use npx for this application on Windows, # so the Windows user is required to have markdown-link-check installed and in PATH. if ! which markdown-link-check &>/dev/null; then - echo "markdown-link-check not found or not in PATH. Please install: https://github.com/tcort/markdown-link-check#readme" + echo "markdown-link-check not found or not in PATH." + echo "Please install: https://github.com/tcort/markdown-link-check#readme" exit 1 fi # Default behavior of the task on Windows is to exit the task when the first broken link causes a non-zero diff --git a/package-lock.json b/package-lock.json index 115235f..c014e6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "arduino-language-server", + "name": "language-server", "lockfileVersion": 2, "requires": true, "packages": { @@ -7,8 +7,8 @@ "devDependencies": { "ajv-cli": "^5.0.0", "ajv-formats": "^2.1.1", - "markdown-link-check": "^3.10.2", - "markdownlint-cli": "^0.32.1" + "markdown-link-check": "^3.11.2", + "markdownlint-cli": "^0.33.0" } }, "node_modules/ajv": { @@ -134,21 +134,6 @@ } } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -183,16 +168,12 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -236,31 +217,13 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, "engines": { - "node": ">= 6" + "node": ">=14" } }, "node_modules/concat-map": { @@ -357,23 +320,23 @@ } }, "node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "dependencies": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" + "domhandler": "^5.0.3" }, "funding": { "url": "https://github.com/fb55/domutils?sponsor=1" } }, "node_modules/entities": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", - "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true, "engines": { "node": ">=0.12" @@ -456,15 +419,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", @@ -475,9 +429,9 @@ } }, "node_modules/htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -488,9 +442,9 @@ ], "dependencies": { "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", + "domhandler": "^5.0.3", "domutils": "^3.0.1", - "entities": "^4.3.0" + "entities": "^4.4.0" } }, "node_modules/iconv-lite": { @@ -506,9 +460,9 @@ } }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true, "engines": { "node": ">= 4" @@ -540,24 +494,30 @@ } }, "node_modules/is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", + "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", "dev": true, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-relative-url": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-3.0.0.tgz", - "integrity": "sha512-U1iSYRlY2GIMGuZx7gezlB5dp1Kheaym7zKzO1PV06mOihiWTXejLwm4poEJysPyXF+HtK/BEd0DVlcCh30pEA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-4.0.0.tgz", + "integrity": "sha512-PkzoL1qKAYXNFct5IKdKRH/iBQou/oCC85QhXj6WKtUQBliZ4Yfd3Zk27RHu9KQG8r6zgvAA2AQKC9p+rqTszg==", "dev": true, "dependencies": { - "is-absolute-url": "^3.0.0" + "is-absolute-url": "^4.0.1" }, "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/isemail": { @@ -612,21 +572,21 @@ } }, "node_modules/jsonc-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz", - "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, "node_modules/link-check": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.1.0.tgz", - "integrity": "sha512-FHq/9tVnIE/3EVEPb91GcbD+K/Pv5K5DYqb7vXi3TTKIViMYPOWxYFVVENZ0rq63zfaGXGvLgPT9U6jOFc5JBw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", + "integrity": "sha512-xRbhYLaGDw7eRDTibTAcl6fXtmUQ13vkezQiTqshHHdGueQeumgxxmQMIOmJYsh2p8BF08t8thhDQ++EAOOq3w==", "dev": true, "dependencies": { - "is-relative-url": "^3.0.0", + "is-relative-url": "^4.0.0", "isemail": "^3.2.0", "ms": "^2.1.3", - "needle": "^3.0.0" + "needle": "^3.1.0" } }, "node_modules/linkify-it": { @@ -673,18 +633,18 @@ } }, "node_modules/markdown-link-check": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.10.2.tgz", - "integrity": "sha512-5yQEVtjLxAjxWy82+iTgxrekr1tuD4sKGgwXiyLrCep8RERFH3yCdpZdeA12em2S2SEwXGxp6qHI73jVhuScKA==", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.11.2.tgz", + "integrity": "sha512-zave+vI4AMeLp0FlUllAwGbNytSKsS3R2Zgtf3ufVT892Z/L6Ro9osZwE9PNA7s0IkJ4onnuHqatpsaCiAShJw==", "dev": true, "dependencies": { - "async": "^3.2.3", - "chalk": "^4.1.2", - "commander": "^6.2.0", - "link-check": "^5.1.0", + "async": "^3.2.4", + "chalk": "^5.2.0", + "commander": "^10.0.1", + "link-check": "^5.2.0", "lodash": "^4.17.21", - "markdown-link-extractor": "^3.0.2", - "needle": "^3.1.0", + "markdown-link-extractor": "^3.1.0", + "needle": "^3.2.0", "progress": "^2.0.3" }, "bin": { @@ -692,42 +652,41 @@ } }, "node_modules/markdown-link-extractor": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-3.0.2.tgz", - "integrity": "sha512-vmTTAWSa49Lqojr6L4ALGLV0TLz4+1movDb6saDS6c6FLGGbPFSkhjevpXsQTXEYY9lCWYcVQqb7l41WEZsM7Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-3.1.0.tgz", + "integrity": "sha512-r0NEbP1dsM+IqB62Ru9TXLP/HDaTdBNIeylYXumuBi6Xv4ufjE1/g3TnslYL8VNqNcGAGbMptQFHrrdfoZ/Sug==", "dev": true, "dependencies": { - "html-link-extractor": "^1.0.3", - "marked": "^4.0.15" + "html-link-extractor": "^1.0.5", + "marked": "^4.1.0" } }, "node_modules/markdownlint": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.26.1.tgz", - "integrity": "sha512-8sLz1ktz5s4E0IDum2H9aiWLQU7RA5Eket9HUW5IRwfFnW2RD2ZyqYePW+z71tMc7lrFZc1+yPmlN9lirbJnlg==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.27.0.tgz", + "integrity": "sha512-HtfVr/hzJJmE0C198F99JLaeada+646B5SaG2pVoEakLFI6iRGsvMqrnnrflq8hm1zQgwskEgqSnhDW11JBp0w==", "dev": true, "dependencies": { "markdown-it": "13.0.1" }, "engines": { - "node": ">=14" + "node": ">=14.18.0" } }, "node_modules/markdownlint-cli": { - "version": "0.32.1", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.32.1.tgz", - "integrity": "sha512-hVLQ+72b5esQd7I+IqzBEB4x/4C+wJaxS2M6nqaGoDwrtNY6gydGf5CIUJtQcXtqsM615++a8TZPsvEtH6H4gw==", + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz", + "integrity": "sha512-zMK1oHpjYkhjO+94+ngARiBBrRDEUMzooDHBAHtmEIJ9oYddd9l3chCReY2mPlecwH7gflQp1ApilTo+o0zopQ==", "dev": true, "dependencies": { - "commander": "~9.4.0", + "commander": "~9.4.1", "get-stdin": "~9.0.0", "glob": "~8.0.3", - "ignore": "~5.2.0", + "ignore": "~5.2.4", "js-yaml": "^4.1.0", - "jsonc-parser": "~3.1.0", - "markdownlint": "~0.26.1", - "markdownlint-rule-helpers": "~0.17.1", - "minimatch": "~5.1.0", + "jsonc-parser": "~3.2.0", + "markdownlint": "~0.27.0", + "minimatch": "~5.1.2", "run-con": "~1.2.11" }, "bin": { @@ -738,27 +697,18 @@ } }, "node_modules/markdownlint-cli/node_modules/commander": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", - "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", "dev": true, "engines": { "node": "^12.20.0 || >=14" } }, - "node_modules/markdownlint-rule-helpers": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.17.1.tgz", - "integrity": "sha512-Djc5IjJt7VA5sZRisISsJC/rQXR7hr8JS9u6Q9/ce3mjPZdzw535cFGG0U6Mag+ldRTRmRwCcTfivOh57KUP4w==", - "dev": true, - "engines": { - "node": ">=12" - } - }, "node_modules/marked": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz", - "integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, "bin": { "marked": "bin/marked.js" @@ -774,9 +724,9 @@ "dev": true }, "node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -798,9 +748,9 @@ "dev": true }, "node_modules/needle": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-3.1.0.tgz", - "integrity": "sha512-gCE9weDhjVGCRqS8dwDR/D3GTAeyXLXuqp7I8EzH6DllZGXSUyxuqqLh+YX9rMAWaaTFyVAg6rHGL25dqvczKw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", + "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", "dev": true, "dependencies": { "debug": "^3.2.6", @@ -836,12 +786,12 @@ } }, "node_modules/parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dev": true, "dependencies": { - "entities": "^4.3.0" + "entities": "^4.4.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -941,18 +891,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", @@ -1066,15 +1004,6 @@ "ajv": "^8.0.0" } }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1109,14 +1038,10 @@ } }, "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true }, "cheerio": { "version": "1.0.0-rc.12", @@ -1147,25 +1072,10 @@ "domutils": "^3.0.1" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true }, "concat-map": { @@ -1235,20 +1145,20 @@ } }, "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", + "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", "dev": true, "requires": { "dom-serializer": "^2.0.0", "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" + "domhandler": "^5.0.3" } }, "entities": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", - "integrity": "sha512-o4q/dYJlmyjP2zfnaWDUC6A3BQFmVTX+tZPezK7k0GLSU9QYCauscf5Y+qcEPzKL+EixVouYDgLQK5H9GrLpkg==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", "dev": true }, "esprima": { @@ -1305,12 +1215,6 @@ "once": "^1.3.0" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, "html-link-extractor": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/html-link-extractor/-/html-link-extractor-1.0.5.tgz", @@ -1321,15 +1225,15 @@ } }, "htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", + "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", "dev": true, "requires": { "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", + "domhandler": "^5.0.3", "domutils": "^3.0.1", - "entities": "^4.3.0" + "entities": "^4.4.0" } }, "iconv-lite": { @@ -1342,9 +1246,9 @@ } }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", "dev": true }, "inflight": { @@ -1370,18 +1274,18 @@ "dev": true }, "is-absolute-url": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", - "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-4.0.1.tgz", + "integrity": "sha512-/51/TKE88Lmm7Gc4/8btclNXWS+g50wXhYJq8HWIBAGUBnoAdRu1aXeh364t/O7wXDAcTJDP8PNuNKWUDWie+A==", "dev": true }, "is-relative-url": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-3.0.0.tgz", - "integrity": "sha512-U1iSYRlY2GIMGuZx7gezlB5dp1Kheaym7zKzO1PV06mOihiWTXejLwm4poEJysPyXF+HtK/BEd0DVlcCh30pEA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-relative-url/-/is-relative-url-4.0.0.tgz", + "integrity": "sha512-PkzoL1qKAYXNFct5IKdKRH/iBQou/oCC85QhXj6WKtUQBliZ4Yfd3Zk27RHu9KQG8r6zgvAA2AQKC9p+rqTszg==", "dev": true, "requires": { - "is-absolute-url": "^3.0.0" + "is-absolute-url": "^4.0.1" } }, "isemail": { @@ -1424,21 +1328,21 @@ "dev": true }, "jsonc-parser": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.1.0.tgz", - "integrity": "sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", "dev": true }, "link-check": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.1.0.tgz", - "integrity": "sha512-FHq/9tVnIE/3EVEPb91GcbD+K/Pv5K5DYqb7vXi3TTKIViMYPOWxYFVVENZ0rq63zfaGXGvLgPT9U6jOFc5JBw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/link-check/-/link-check-5.2.0.tgz", + "integrity": "sha512-xRbhYLaGDw7eRDTibTAcl6fXtmUQ13vkezQiTqshHHdGueQeumgxxmQMIOmJYsh2p8BF08t8thhDQ++EAOOq3w==", "dev": true, "requires": { - "is-relative-url": "^3.0.0", + "is-relative-url": "^4.0.0", "isemail": "^3.2.0", "ms": "^2.1.3", - "needle": "^3.0.0" + "needle": "^3.1.0" } }, "linkify-it": { @@ -1478,76 +1382,69 @@ } }, "markdown-link-check": { - "version": "3.10.2", - "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.10.2.tgz", - "integrity": "sha512-5yQEVtjLxAjxWy82+iTgxrekr1tuD4sKGgwXiyLrCep8RERFH3yCdpZdeA12em2S2SEwXGxp6qHI73jVhuScKA==", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/markdown-link-check/-/markdown-link-check-3.11.2.tgz", + "integrity": "sha512-zave+vI4AMeLp0FlUllAwGbNytSKsS3R2Zgtf3ufVT892Z/L6Ro9osZwE9PNA7s0IkJ4onnuHqatpsaCiAShJw==", "dev": true, "requires": { - "async": "^3.2.3", - "chalk": "^4.1.2", - "commander": "^6.2.0", - "link-check": "^5.1.0", + "async": "^3.2.4", + "chalk": "^5.2.0", + "commander": "^10.0.1", + "link-check": "^5.2.0", "lodash": "^4.17.21", - "markdown-link-extractor": "^3.0.2", - "needle": "^3.1.0", + "markdown-link-extractor": "^3.1.0", + "needle": "^3.2.0", "progress": "^2.0.3" } }, "markdown-link-extractor": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-3.0.2.tgz", - "integrity": "sha512-vmTTAWSa49Lqojr6L4ALGLV0TLz4+1movDb6saDS6c6FLGGbPFSkhjevpXsQTXEYY9lCWYcVQqb7l41WEZsM7Q==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/markdown-link-extractor/-/markdown-link-extractor-3.1.0.tgz", + "integrity": "sha512-r0NEbP1dsM+IqB62Ru9TXLP/HDaTdBNIeylYXumuBi6Xv4ufjE1/g3TnslYL8VNqNcGAGbMptQFHrrdfoZ/Sug==", "dev": true, "requires": { - "html-link-extractor": "^1.0.3", - "marked": "^4.0.15" + "html-link-extractor": "^1.0.5", + "marked": "^4.1.0" } }, "markdownlint": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.26.1.tgz", - "integrity": "sha512-8sLz1ktz5s4E0IDum2H9aiWLQU7RA5Eket9HUW5IRwfFnW2RD2ZyqYePW+z71tMc7lrFZc1+yPmlN9lirbJnlg==", + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.27.0.tgz", + "integrity": "sha512-HtfVr/hzJJmE0C198F99JLaeada+646B5SaG2pVoEakLFI6iRGsvMqrnnrflq8hm1zQgwskEgqSnhDW11JBp0w==", "dev": true, "requires": { "markdown-it": "13.0.1" } }, "markdownlint-cli": { - "version": "0.32.1", - "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.32.1.tgz", - "integrity": "sha512-hVLQ+72b5esQd7I+IqzBEB4x/4C+wJaxS2M6nqaGoDwrtNY6gydGf5CIUJtQcXtqsM615++a8TZPsvEtH6H4gw==", + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz", + "integrity": "sha512-zMK1oHpjYkhjO+94+ngARiBBrRDEUMzooDHBAHtmEIJ9oYddd9l3chCReY2mPlecwH7gflQp1ApilTo+o0zopQ==", "dev": true, "requires": { - "commander": "~9.4.0", + "commander": "~9.4.1", "get-stdin": "~9.0.0", "glob": "~8.0.3", - "ignore": "~5.2.0", + "ignore": "~5.2.4", "js-yaml": "^4.1.0", - "jsonc-parser": "~3.1.0", - "markdownlint": "~0.26.1", - "markdownlint-rule-helpers": "~0.17.1", - "minimatch": "~5.1.0", + "jsonc-parser": "~3.2.0", + "markdownlint": "~0.27.0", + "minimatch": "~5.1.2", "run-con": "~1.2.11" }, "dependencies": { "commander": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.0.tgz", - "integrity": "sha512-sRPT+umqkz90UA8M1yqYfnHlZA7fF6nSphDtxeywPZ49ysjxDQybzk13CL+mXekDRG92skbcqCLVovuCusNmFw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", + "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", "dev": true } } }, - "markdownlint-rule-helpers": { - "version": "0.17.1", - "resolved": "https://registry.npmjs.org/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.17.1.tgz", - "integrity": "sha512-Djc5IjJt7VA5sZRisISsJC/rQXR7hr8JS9u6Q9/ce3mjPZdzw535cFGG0U6Mag+ldRTRmRwCcTfivOh57KUP4w==", - "dev": true - }, "marked": { - "version": "4.0.18", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.18.tgz", - "integrity": "sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, "mdurl": { @@ -1557,9 +1454,9 @@ "dev": true }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "requires": { "brace-expansion": "^2.0.1" @@ -1578,9 +1475,9 @@ "dev": true }, "needle": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-3.1.0.tgz", - "integrity": "sha512-gCE9weDhjVGCRqS8dwDR/D3GTAeyXLXuqp7I8EzH6DllZGXSUyxuqqLh+YX9rMAWaaTFyVAg6rHGL25dqvczKw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz", + "integrity": "sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ==", "dev": true, "requires": { "debug": "^3.2.6", @@ -1607,12 +1504,12 @@ } }, "parse5": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz", - "integrity": "sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", + "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", "dev": true, "requires": { - "entities": "^4.3.0" + "entities": "^4.4.0" } }, "parse5-htmlparser2-tree-adapter": { @@ -1685,15 +1582,6 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - }, "uc.micro": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", diff --git a/package.json b/package.json index 303a36b..47ec075 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "devDependencies": { "ajv-cli": "^5.0.0", "ajv-formats": "^2.1.1", - "markdown-link-check": "^3.10.2", - "markdownlint-cli": "^0.32.1" + "markdown-link-check": "^3.11.2", + "markdownlint-cli": "^0.33.0" } } From e36c43c94dde3d2f4688bbe30410aa8011d805ca Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Tue, 16 May 2023 09:06:09 +0200 Subject: [PATCH 06/15] Sync check-taskfiles with upstream template --- .github/workflows/check-taskfiles.yml | 30 +++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-taskfiles.yml b/.github/workflows/check-taskfiles.yml index 9d24b9e..8ddef82 100644 --- a/.github/workflows/check-taskfiles.yml +++ b/.github/workflows/check-taskfiles.yml @@ -7,6 +7,7 @@ env: # See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows on: + create: push: paths: - ".github/workflows/check-taskfiles.ya?ml" @@ -28,8 +29,33 @@ on: repository_dispatch: jobs: + run-determination: + runs-on: ubuntu-latest + outputs: + result: ${{ steps.determination.outputs.result }} + steps: + - name: Determine if the rest of the workflow should run + id: determination + run: | + RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" + # The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead. + if [[ + "${{ github.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX + ]]; then + # Run the other jobs. + RESULT="true" + else + # There is no need to run the other jobs. + RESULT="false" + fi + + echo "result=$RESULT" >> $GITHUB_OUTPUT + validate: name: Validate ${{ matrix.file }} + needs: run-determination + if: needs.run-determination.outputs.result == 'true' runs-on: ubuntu-latest strategy: @@ -53,8 +79,8 @@ jobs: id: download-schema uses: carlosperate/download-file-action@v2 with: - # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json - file-url: https://json.schemastore.org/taskfile.json + # Source: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/taskfile.json + file-url: https://taskfile.dev/schema.json location: ${{ runner.temp }}/taskfile-schema - name: Install JSON schema validator From ad76b80ec76d5c0a79b52bb032341b6046c0983e Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Tue, 16 May 2023 09:14:12 +0200 Subject: [PATCH 07/15] Sync release-go-task with upstream template --- .github/workflows/release-go-task.yml | 62 ++++++++++++++++----------- DistTasks.yml | 25 +---------- 2 files changed, 39 insertions(+), 48 deletions(-) diff --git a/.github/workflows/release-go-task.yml b/.github/workflows/release-go-task.yml index 44896e0..4b8991f 100644 --- a/.github/workflows/release-go-task.yml +++ b/.github/workflows/release-go-task.yml @@ -19,6 +19,19 @@ jobs: create-release-artifacts: runs-on: ubuntu-latest + strategy: + matrix: + os: + - Windows_32bit + - Windows_64bit + - Linux_32bit + - Linux_64bit + - Linux_ARMv6 + - Linux_ARMv7 + - Linux_ARM64 + - macOS_64bit + - macOS_ARM64 + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -26,6 +39,8 @@ jobs: fetch-depth: 0 - name: Create changelog + # Avoid creating the same changelog for each os + if: matrix.os == 'Windows_32bit' uses: arduino/create-changelog@v1 with: tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+.*$' @@ -40,7 +55,7 @@ jobs: version: 3.x - name: Build - run: task dist:all + run: task dist:${{ matrix.os }} - name: Upload artifacts uses: actions/upload-artifact@v3 @@ -48,7 +63,7 @@ jobs: if-no-files-found: error name: ${{ env.ARTIFACT_NAME }} path: ${{ env.DIST_DIR }} - + notarize-macos: name: Notarize ${{ matrix.artifact.name }} runs-on: macos-latest @@ -82,7 +97,8 @@ jobs: env: KEYCHAIN: "sign.keychain" INSTALLER_CERT_MAC_PATH: "/tmp/ArduinoCerts2020.p12" - KEYCHAIN_PASSWORD: keychainpassword # Arbitrary password for a keychain that exists only for the duration of the job, so not secret + # Arbitrary password for a keychain that exists only for the duration of the job, so not secret + KEYCHAIN_PASSWORD: keychainpassword run: | echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}" security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}" @@ -132,14 +148,10 @@ jobs: run: | gon "${{ env.GON_CONFIG_PATH }}" - - name: Re-package binary and output checksum + - name: Re-package binary id: re-package working-directory: ${{ env.DIST_DIR }} - # This step performs the following: - # 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file) - # 2. Recalculate package checksum - # 3. Output the new checksum to include in the nnnnnn-checksums.txt file - # (it cannot be done there because of workflow job parallelization) + # Repackage the signed binary replaced in place by Gon (ignoring the output zip file) run: | # GitHub's upload/download-artifact actions don't preserve file permissions, # so we need to add execution permission back until the action is made to do this. @@ -149,11 +161,9 @@ jobs: tar -czvf "$PACKAGE_FILENAME" \ -C "${{ env.PROJECT_NAME }}_osx_${{ matrix.artifact.name }}/" "${{ env.PROJECT_NAME }}" \ -C ../../ LICENSE.txt - CHECKSUM_LINE="$(shasum -a 256 $PACKAGE_FILENAME)" echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >> $GITHUB_ENV - echo "::set-output name=checksum-${{ matrix.artifact.name }}::$CHECKSUM_LINE" - - name: Upload artifacts + - name: Upload artifact uses: actions/upload-artifact@v3 with: if-no-files-found: error @@ -170,25 +180,29 @@ jobs: with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.DIST_DIR }} - - - name: Update checksum + + - name: Create checksum file + working-directory: ${{ env.DIST_DIR}} run: | - declare -a checksum_lines=("${{ needs.notarize-macos.outputs.checksum-darwin_amd64 }}" "${{ needs.notarize-macos.outputs.checksum-darwin_arm64 }}") - for checksum_line in "${checksum_lines[@]}" - do - CHECKSUM=$(echo ${checksum_line} | cut -d " " -f 1) - PACKAGE_FILENAME=$(echo ${checksum_line} | cut -d " " -f 2) - perl -pi -w -e "s/.*${PACKAGE_FILENAME}/${CHECKSUM} ${PACKAGE_FILENAME}/g;" ${{ env.DIST_DIR }}/*-checksums.txt - done + TAG="${GITHUB_REF/refs\/tags\//}" + sha256sum ${{ env.PROJECT_NAME }}_${TAG}* > ${TAG}-checksums.txt - name: Identify Prerelease # This is a workaround while waiting for create-release action # to implement auto pre-release based on tag id: prerelease run: | - wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.0.0.zip - unzip -p /tmp/3.0.0.zip semver-tool-3.0.0/src/semver >/tmp/semver && chmod +x /tmp/semver - if [[ "$(/tmp/semver get prerel "${GITHUB_REF/refs\/tags\//}")" ]]; then echo "::set-output name=IS_PRE::true"; fi + wget -q -P /tmp https://github.com/fsaintjacques/semver-tool/archive/3.2.0.zip + unzip -p /tmp/3.2.0.zip semver-tool-3.2.0/src/semver >/tmp/semver && chmod +x /tmp/semver + if [[ \ + "$( + /tmp/semver get prerel \ + "${GITHUB_REF/refs\/tags\//}" + )" != \ + "" \ + ]]; then + echo "IS_PRE=true" >> $GITHUB_OUTPUT + fi - name: Create Github Release and upload artifacts uses: ncipollo/release-action@v1 diff --git a/DistTasks.yml b/DistTasks.yml index 4f4cf5d..ce54ca0 100644 --- a/DistTasks.yml +++ b/DistTasks.yml @@ -20,22 +20,8 @@ version: "3" vars: CONTAINER: "docker.elastic.co/beats-dev/golang-crossbuild" GO_VERSION: "1.18.3" - CHECKSUM_FILE: "{{.VERSION}}-checksums.txt" tasks: - all: - desc: Build for distribution for all platforms - cmds: - - task: Windows_32bit - - task: Windows_64bit - - task: Linux_32bit - - task: Linux_64bit - - task: Linux_ARMv6 - - task: Linux_ARMv7 - - task: Linux_ARM64 - - task: macOS_64bit - - task: macOS_ARM64 - Windows_32bit: desc: Builds Windows 32 bit binaries dir: "{{.DIST_DIR}}" @@ -48,7 +34,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe ../LICENSE.txt -j - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_windows_386" @@ -70,7 +55,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" zip {{.PACKAGE_NAME}} {{.PLATFORM_DIR}}/{{.PROJECT_NAME}}.exe ../LICENSE.txt -j - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_windows_amd64" @@ -92,7 +76,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_amd32" @@ -114,7 +97,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_amd64" @@ -136,7 +118,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_7" @@ -158,7 +139,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_6" @@ -208,10 +188,9 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: - PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_6" + PLATFORM_DIR: "{{.PROJECT_NAME}}_linux_arm_64" BUILD_COMMAND: "go build -o {{.DIST_DIR}}/{{.PLATFORM_DIR}}/{{.PROJECT_NAME}} {{.LDFLAGS}}" BUILD_PLATFORM: "linux/arm64" CONTAINER_TAG: "{{.GO_VERSION}}-arm" @@ -230,7 +209,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_osx_darwin_amd64" @@ -265,7 +243,6 @@ tasks: -p "{{.BUILD_PLATFORM}}" tar cz -C {{.PLATFORM_DIR}} {{.PROJECT_NAME}} -C ../.. LICENSE.txt -f {{.PACKAGE_NAME}} - sha256sum {{.PACKAGE_NAME}} >> {{.CHECKSUM_FILE}} vars: PLATFORM_DIR: "{{.PROJECT_NAME}}_osx_darwin_arm64" From 0e6d316c9cf11a9d4d2aa4fef156849141df6ee7 Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Tue, 16 May 2023 09:16:00 +0200 Subject: [PATCH 08/15] Sync sync-labels with upstream template --- .github/workflows/sync-labels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 70085bd..15d8fc1 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -1,7 +1,7 @@ # Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/sync-labels.md name: Sync Labels -# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +# See: https://docs.github.com/actions/using-workflows/events-that-trigger-workflows on: push: paths: @@ -86,7 +86,7 @@ jobs: steps: - name: Set environment variables run: | - # See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + # See: https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#setting-an-environment-variable echo "MERGED_CONFIGURATION_PATH=${{ runner.temp }}/labels.yml" >> "$GITHUB_ENV" - name: Determine whether to dry run @@ -103,7 +103,7 @@ jobs: run: | # Use of this flag in the github-label-sync command will cause it to only check the validity of the # configuration. - echo "::set-output name=flag::--dry-run" + echo "flag=--dry-run" >> $GITHUB_OUTPUT - name: Checkout repository uses: actions/checkout@v3 From 03fd62f4612fff5ce44ee2b1eb4488d4bbae8628 Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Mon, 15 May 2023 17:32:09 +0200 Subject: [PATCH 09/15] Bump go-win-32-utils dependency --- go.mod | 4 ++-- go.sum | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index ecef929..dad9d31 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( require ( github.com/arduino/go-properties-orderedmap v1.6.0 // indirect - github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b // indirect + github.com/arduino/go-win32-utils v1.0.0 // indirect github.com/codeclysm/extract/v3 v3.0.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/djherbis/buffer v1.1.0 // indirect @@ -48,7 +48,7 @@ require ( go.bug.st/relaxed-semver v0.9.0 // indirect golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect golang.org/x/net v0.0.0-20210505024714-0287a6fb4125 // indirect - golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect + golang.org/x/sys v0.6.0 // indirect golang.org/x/text v0.3.6 // indirect google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect google.golang.org/protobuf v1.26.0 // indirect diff --git a/go.sum b/go.sum index 383a36b..771a6c2 100644 --- a/go.sum +++ b/go.sum @@ -49,8 +49,8 @@ github.com/arduino/go-paths-helper v1.7.0 h1:S9l5BP2aogz1CgyqqnncXt0PLpK4yvwOW/w github.com/arduino/go-paths-helper v1.7.0/go.mod h1:V82BWgAAp4IbmlybxQdk9Bpkz8M4Qyx+RAFKaG9NuvU= github.com/arduino/go-properties-orderedmap v1.6.0 h1:gp2JoWRETtqwsZ+UHu/PBuYWYH2x2+d+uipDxS4WmvM= github.com/arduino/go-properties-orderedmap v1.6.0/go.mod h1:DKjD2VXY/NZmlingh4lSFMEYCVubfeArCsGPGDwb2yk= -github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b h1:3PjgYG5gVPA7cipp7vIR2lF96KkEJIFBJ+ANnuv6J20= -github.com/arduino/go-win32-utils v0.0.0-20180330194947-ed041402e83b/go.mod h1:iIPnclBMYm1g32Q5kXoqng4jLhMStReIP7ZxaoUC2y8= +github.com/arduino/go-win32-utils v1.0.0 h1:/cXB86sOJxOsCHP7sQmXGLkdValwJt56mIwOHYxgQjQ= +github.com/arduino/go-win32-utils v1.0.0/go.mod h1:0jqM7doGEAs6DaJCxxhLBUDS5OawrqF48HqXkcEie/Q= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -472,8 +472,8 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= -golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 7392c5b9c4f912de8e306b4ddf5dda6c7bdea0d8 Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Mon, 22 May 2023 09:52:51 +0200 Subject: [PATCH 10/15] Update metadata cache --- .../github.com/arduino/go-win32-utils.dep.yml | 5 +- .../x/sys/internal/unsafeheader.dep.yml | 63 ------------------- .../go/golang.org/x/sys/unix.dep.yml | 6 +- 3 files changed, 6 insertions(+), 68 deletions(-) delete mode 100644 .licenses/arduino-language-server/go/golang.org/x/sys/internal/unsafeheader.dep.yml diff --git a/.licenses/arduino-language-server/go/github.com/arduino/go-win32-utils.dep.yml b/.licenses/arduino-language-server/go/github.com/arduino/go-win32-utils.dep.yml index 86edb27..8244984 100644 --- a/.licenses/arduino-language-server/go/github.com/arduino/go-win32-utils.dep.yml +++ b/.licenses/arduino-language-server/go/github.com/arduino/go-win32-utils.dep.yml @@ -1,8 +1,9 @@ --- name: github.com/arduino/go-win32-utils -version: v0.0.0-20180330194947-ed041402e83b +version: v1.0.0 type: go -summary: +summary: win32 is a collection of useful bindings to Win32 API that are not available + in the standard golang windows/syscall package. homepage: https://pkg.go.dev/github.com/arduino/go-win32-utils license: gpl-2.0-or-later licenses: diff --git a/.licenses/arduino-language-server/go/golang.org/x/sys/internal/unsafeheader.dep.yml b/.licenses/arduino-language-server/go/golang.org/x/sys/internal/unsafeheader.dep.yml deleted file mode 100644 index 0ee7231..0000000 --- a/.licenses/arduino-language-server/go/golang.org/x/sys/internal/unsafeheader.dep.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -name: golang.org/x/sys/internal/unsafeheader -version: v0.0.0-20210823070655-63515b42dcdf -type: go -summary: Package unsafeheader contains header declarations for the Go runtime's slice - and string implementations. -homepage: https://pkg.go.dev/golang.org/x/sys/internal/unsafeheader -license: bsd-3-clause -licenses: -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/LICENSE - text: | - Copyright (c) 2009 The Go Authors. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/PATENTS - text: | - Additional IP Rights Grant (Patents) - - "This implementation" means the copyrightable works distributed by - Google as part of the Go project. - - Google hereby grants to You a perpetual, worldwide, non-exclusive, - no-charge, royalty-free, irrevocable (except as stated in this section) - patent license to make, have made, use, offer to sell, sell, import, - transfer and otherwise run, modify and propagate the contents of this - implementation of Go, where such license applies only to those patent - claims, both currently owned or controlled by Google and acquired in - the future, licensable by Google that are necessarily infringed by this - implementation of Go. This grant does not include claims that would be - infringed only as a consequence of further modification of this - implementation. If you or your agent or exclusive licensee institute or - order or agree to the institution of patent litigation against any - entity (including a cross-claim or counterclaim in a lawsuit) alleging - that this implementation of Go or any code incorporated within this - implementation of Go constitutes direct or contributory patent - infringement, or inducement of patent infringement, then any patent - rights granted to you under this License for this implementation of Go - shall terminate as of the date such litigation is filed. -notices: [] diff --git a/.licenses/arduino-language-server/go/golang.org/x/sys/unix.dep.yml b/.licenses/arduino-language-server/go/golang.org/x/sys/unix.dep.yml index b33445f..7f070cd 100644 --- a/.licenses/arduino-language-server/go/golang.org/x/sys/unix.dep.yml +++ b/.licenses/arduino-language-server/go/golang.org/x/sys/unix.dep.yml @@ -1,12 +1,12 @@ --- name: golang.org/x/sys/unix -version: v0.0.0-20210823070655-63515b42dcdf +version: v0.6.0 type: go summary: Package unix contains an interface to the low-level operating system primitives. homepage: https://pkg.go.dev/golang.org/x/sys/unix license: bsd-3-clause licenses: -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/LICENSE +- sources: sys@v0.6.0/LICENSE text: | Copyright (c) 2009 The Go Authors. All rights reserved. @@ -35,7 +35,7 @@ licenses: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- sources: sys@v0.0.0-20210823070655-63515b42dcdf/PATENTS +- sources: sys@v0.6.0/PATENTS text: | Additional IP Rights Grant (Patents) From 923dbd5d317a2b6ca5f6520297fab9b4d8148221 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 21 Mar 2023 16:01:17 +0100 Subject: [PATCH 11/15] Create a detached process to clean up tmp dirs on closing The temp dir cleanup is done on the "exit" notification. BTW, if the OS/system is too slow, the language server may be killed by the IDE if it takes too long to clean up temporary build directories. To avoid it a new detached process is created with the only purpose to remove the temporary directories. Since it's detached it will run even after the parent process exits. --- ls/ls.go | 50 ++++++++++++++++++++++++++++++++++++++++++-------- main.go | 7 +++++++ 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/ls/ls.go b/ls/ls.go index 17e4f56..ea2933d 100644 --- a/ls/ls.go +++ b/ls/ls.go @@ -22,6 +22,7 @@ import ( "io" "log" "os" + "os/exec" "strconv" "strings" "sync" @@ -50,6 +51,7 @@ type INOLanguageServer struct { progressHandler *progressProxyHandler closing chan bool + removeTempMutex sync.Mutex clangdStarted *sync.Cond dataMux sync.RWMutex buildPath *paths.Path @@ -387,6 +389,7 @@ func (ls *INOLanguageServer) shutdownReqFromIDE(ctx context.Context, logger json close(done) }() _, _ = ls.Clangd.conn.Shutdown(context.Background()) + ls.removeTemporaryFiles(logger) <-done return nil } @@ -1371,6 +1374,45 @@ func (ls *INOLanguageServer) setTraceNotifFromIDE(logger jsonrpc.FunctionLogger, ls.Clangd.conn.SetTrace(params) } +func (ls *INOLanguageServer) removeTemporaryFiles(logger jsonrpc.FunctionLogger) { + ls.removeTempMutex.Lock() + defer ls.removeTempMutex.Unlock() + + args := []string{"remove-temp-files"} + if ls.buildPath != nil { + args = append(args, ls.buildPath.String()) + } + if ls.fullBuildPath != nil { + args = append(args, ls.fullBuildPath.String()) + } + if len(args) == 1 { + // Nothing to remove + return + } + + // Start a detached process to remove the temp files + cwd, err := os.Getwd() + if err != nil { + logger.Logf("Error getting current working directory: %s", err) + return + } + cmd := exec.Command(os.Args[0], args...) + cmd.Dir = cwd + if err := cmd.Start(); err != nil { + logger.Logf("Error starting remove-temp-files process: %s", err) + return + } + + // The process is now started, we can reset the paths + ls.buildPath, ls.fullBuildPath = nil, nil + + // Detach the process so it can continue running even if the parent process exits + if err := cmd.Process.Release(); err != nil { + logger.Logf("Error detaching remove-temp-files process: %s", err) + return + } +} + // Close closes all the json-rpc connections and clean-up temp folders. func (ls *INOLanguageServer) Close() { if ls.Clangd != nil { @@ -1381,14 +1423,6 @@ func (ls *INOLanguageServer) Close() { close(ls.closing) ls.closing = nil } - if ls.buildPath != nil { - ls.buildPath.RemoveAll() - ls.buildPath = nil - } - if ls.fullBuildPath != nil { - ls.fullBuildPath.RemoveAll() - ls.fullBuildPath = nil - } } // CloseNotify returns a channel that is closed when the InoHandler is closed diff --git a/main.go b/main.go index 3333672..0143adc 100644 --- a/main.go +++ b/main.go @@ -20,6 +20,13 @@ import ( ) func main() { + if len(os.Args) > 1 && os.Args[1] == "remove-temp-files" { + for _, tmpFile := range os.Args[2:] { + paths.New(tmpFile).RemoveAll() + } + return + } + clangdPath := flag.String( "clangd", "", "Path to clangd executable") From 11be75009deb32f75301232b1a9c0347b9f5fc77 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 21 Mar 2023 16:19:20 +0100 Subject: [PATCH 12/15] Keep all language-server tmp files inside a single subdir --- ls/ls.go | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ls/ls.go b/ls/ls.go index ea2933d..f5d734a 100644 --- a/ls/ls.go +++ b/ls/ls.go @@ -54,6 +54,7 @@ type INOLanguageServer struct { removeTempMutex sync.Mutex clangdStarted *sync.Cond dataMux sync.RWMutex + tempDir *paths.Path buildPath *paths.Path buildSketchRoot *paths.Path buildSketchCpp *paths.Path @@ -146,18 +147,21 @@ func NewINOLanguageServer(stdin io.Reader, stdout io.Writer, config *Config) *IN if tmp, err := paths.MkTempDir("", "arduino-language-server"); err != nil { log.Fatalf("Could not create temp folder: %s", err) } else { - ls.buildPath = tmp.Canonical() - ls.buildSketchRoot = ls.buildPath.Join("sketch") + ls.tempDir = tmp.Canonical() } - - if tmp, err := paths.MkTempDir("", "arduino-language-server"); err != nil { + ls.buildPath = ls.tempDir.Join("build") + ls.buildSketchRoot = ls.buildPath.Join("sketch") + if err := ls.buildPath.MkdirAll(); err != nil { + log.Fatalf("Could not create temp folder: %s", err) + } + ls.fullBuildPath = ls.tempDir.Join("fullbuild") + if err := ls.fullBuildPath.MkdirAll(); err != nil { log.Fatalf("Could not create temp folder: %s", err) - } else { - ls.fullBuildPath = tmp.Canonical() } logger.Logf("Initial board configuration: %s", ls.config.Fqbn) logger.Logf("%s", globals.VersionInfo.String()) + logger.Logf("Language server temp directory: %s", ls.tempDir) logger.Logf("Language server build path: %s", ls.buildPath) logger.Logf("Language server build sketch root: %s", ls.buildSketchRoot) logger.Logf("Language server FULL build path: %s", ls.fullBuildPath) @@ -1378,14 +1382,7 @@ func (ls *INOLanguageServer) removeTemporaryFiles(logger jsonrpc.FunctionLogger) ls.removeTempMutex.Lock() defer ls.removeTempMutex.Unlock() - args := []string{"remove-temp-files"} - if ls.buildPath != nil { - args = append(args, ls.buildPath.String()) - } - if ls.fullBuildPath != nil { - args = append(args, ls.fullBuildPath.String()) - } - if len(args) == 1 { + if ls.tempDir == nil { // Nothing to remove return } @@ -1396,7 +1393,7 @@ func (ls *INOLanguageServer) removeTemporaryFiles(logger jsonrpc.FunctionLogger) logger.Logf("Error getting current working directory: %s", err) return } - cmd := exec.Command(os.Args[0], args...) + cmd := exec.Command(os.Args[0], "remove-temp-files", ls.tempDir.String()) cmd.Dir = cwd if err := cmd.Start(); err != nil { logger.Logf("Error starting remove-temp-files process: %s", err) @@ -1404,7 +1401,7 @@ func (ls *INOLanguageServer) removeTemporaryFiles(logger jsonrpc.FunctionLogger) } // The process is now started, we can reset the paths - ls.buildPath, ls.fullBuildPath = nil, nil + ls.buildPath, ls.fullBuildPath, ls.buildSketchRoot, ls.tempDir = nil, nil, nil, nil // Detach the process so it can continue running even if the parent process exits if err := cmd.Process.Release(); err != nil { From ffb735c793907870f8dea6ad9bf683f9a1a5cc27 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 21 Mar 2023 16:20:04 +0100 Subject: [PATCH 13/15] Tell clangd to write tmp files inside the language server tmp dir Fix #145 --- ls/lsp_client_clangd.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ls/lsp_client_clangd.go b/ls/lsp_client_clangd.go index 83789bb..d4b9322 100644 --- a/ls/lsp_client_clangd.go +++ b/ls/lsp_client_clangd.go @@ -60,7 +60,12 @@ func newClangdLSPClient(logger jsonrpc.FunctionLogger, dataFolder *paths.Path, l logger.Logf(" Starting clangd: %s", strings.Join(args, " ")) var clangdStdin io.WriteCloser var clangdStdout, clangdStderr io.ReadCloser - if clangdCmd, err := executils.NewProcess(nil, args...); err != nil { + var extraEnv []string + if ls.tempDir != nil { + extraEnv = append(extraEnv, "TMPDIR="+ls.tempDir.String()) // For unix-based systems + extraEnv = append(extraEnv, "TMP="+ls.tempDir.String()) // For Windows + } + if clangdCmd, err := executils.NewProcess(extraEnv, args...); err != nil { panic("starting clangd: " + err.Error()) } else if cin, err := clangdCmd.StdinPipe(); err != nil { panic("getting clangd stdin: " + err.Error()) From 84f3847b6a06fb9a77a198d811a8734d642abefd Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 21 Mar 2023 16:20:33 +0100 Subject: [PATCH 14/15] Fixed an unrelated linter error --- ls/lsp_server_ide.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/ls/lsp_server_ide.go b/ls/lsp_server_ide.go index 5fbe3b5..28228cf 100644 --- a/ls/lsp_server_ide.go +++ b/ls/lsp_server_ide.go @@ -303,8 +303,6 @@ func (server *IDELSPServer) WorkspaceDidChangeConfiguration(logger jsonrpc.Funct // // Since ALS doesn’t have any workspace configuration yet, // ignore it. - return - } // WorkspaceDidChangeWatchedFiles is not implemented From ca7d9ae34f75f30b6f7854daf108a47ec1625ced Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 17 Aug 2023 14:48:55 +0200 Subject: [PATCH 15/15] Added safety check --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index 0143adc..ed38ad5 100644 --- a/main.go +++ b/main.go @@ -12,6 +12,7 @@ import ( "os/signal" "os/user" "path" + "strings" "github.com/arduino/arduino-language-server/ls" "github.com/arduino/arduino-language-server/streams" @@ -22,6 +23,12 @@ import ( func main() { if len(os.Args) > 1 && os.Args[1] == "remove-temp-files" { for _, tmpFile := range os.Args[2:] { + // SAFETY CHECK + if !strings.Contains(tmpFile, "arduino-language-server") { + fmt.Println("Could not remove extraneous temp folder:", tmpFile) + os.Exit(1) + } + paths.New(tmpFile).RemoveAll() } return