From 28fa3f662bf036d7b0c151b87c2a729d24623aa1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 00:29:51 +0000 Subject: [PATCH 1/2] Bump eslint-plugin-jsonc from 2.12.2 to 2.13.0 Bumps [eslint-plugin-jsonc](https://github.com/ota-meshi/eslint-plugin-jsonc) from 2.12.2 to 2.13.0. - [Release notes](https://github.com/ota-meshi/eslint-plugin-jsonc/releases) - [Changelog](https://github.com/ota-meshi/eslint-plugin-jsonc/blob/master/CHANGELOG.md) - [Commits](https://github.com/ota-meshi/eslint-plugin-jsonc/compare/v2.12.2...v2.13.0) --- updated-dependencies: - dependency-name: eslint-plugin-jsonc dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 53 +++++++++++++++++++++++++++++++++++++++-------- package.json | 2 +- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 824fa17..ca0f240 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsonc": "^2.12.2" + "eslint-plugin-jsonc": "^2.13.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -815,9 +815,9 @@ } }, "node_modules/eslint-plugin-jsonc": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.12.2.tgz", - "integrity": "sha512-iv2BLi1bqkSxCPEvDOY6xiBXzAFi5iS2gTOU8fnXGfKxkC6MvC5Tw2XAgbP6R6WRlqV7AtFItx4Xb7mCONtmmw==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.13.0.tgz", + "integrity": "sha512-2wWdJfpO/UbZzPDABuUVvlUQjfMJa2p2iQfYt/oWxOMpXCcjuiMUSaA02gtY/Dbu82vpaSqc+O7Xq6ECHwtIxA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", @@ -825,7 +825,8 @@ "espree": "^9.6.1", "graphemer": "^1.4.0", "jsonc-eslint-parser": "^2.0.4", - "natural-compare": "^1.4.0" + "natural-compare": "^1.4.0", + "synckit": "^0.6.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2221,6 +2222,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/synckit": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.6.2.tgz", + "integrity": "sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==", + "dev": true, + "dependencies": { + "tslib": "^2.3.1" + }, + "engines": { + "node": ">=12.20" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -2239,6 +2252,12 @@ "strip-bom": "^3.0.0" } }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3074,9 +3093,9 @@ } }, "eslint-plugin-jsonc": { - "version": "2.12.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.12.2.tgz", - "integrity": "sha512-iv2BLi1bqkSxCPEvDOY6xiBXzAFi5iS2gTOU8fnXGfKxkC6MvC5Tw2XAgbP6R6WRlqV7AtFItx4Xb7mCONtmmw==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsonc/-/eslint-plugin-jsonc-2.13.0.tgz", + "integrity": "sha512-2wWdJfpO/UbZzPDABuUVvlUQjfMJa2p2iQfYt/oWxOMpXCcjuiMUSaA02gtY/Dbu82vpaSqc+O7Xq6ECHwtIxA==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", @@ -3084,7 +3103,8 @@ "espree": "^9.6.1", "graphemer": "^1.4.0", "jsonc-eslint-parser": "^2.0.4", - "natural-compare": "^1.4.0" + "natural-compare": "^1.4.0", + "synckit": "^0.6.0" } }, "eslint-scope": { @@ -4003,6 +4023,15 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" }, + "synckit": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.6.2.tgz", + "integrity": "sha512-Vhf+bUa//YSTYKseDiiEuQmhGCoIF3CVBhunm3r/DQnYiGT4JssmnKQc44BIyOZRK2pKjXXAgbhfmbeoC9CJpA==", + "dev": true, + "requires": { + "tslib": "^2.3.1" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4021,6 +4050,12 @@ "strip-bom": "^3.0.0" } }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index d125a9a..ed34b8b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jsonc": "^2.12.2" + "eslint-plugin-jsonc": "^2.13.0" }, "scripts": { "lint": "eslint --ext .js,.jsx ." From 40a69be1ce69ede0ee3f8bbde3ce0c070b9208d0 Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 24 Jan 2024 07:34:56 -0800 Subject: [PATCH 2/2] Install referenced schema in "Check npm" workflow The "Check npm" GitHub Actions workflow validates the repository's `package.json` npm manifest file against its JSON schema to catch any problems with its data format. In order to avoid duplication of content, JSON schemas may reference other schemas via the `$ref` keyword. The `package.json` schema was recently updated to share resources with the npm-badges configuration schema, which caused the validation to start failing: schema /home/runner/work/_temp/json-schema/package-json-schema.json is invalid error: can't resolve reference https://json.schemastore.org/partial-eslint-plugins.json from id https://json.schemastore.org/eslintrc.json# The solution is to configure the workflow to download that schema as well and also to provide its path to the avj-cli validator via a `-r` flag. --- .github/workflows/check-npm.yml | 22 ++++++++++++++++++++++ workflow-templates/check-npm.yml | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/.github/workflows/check-npm.yml b/.github/workflows/check-npm.yml index 740918b..160788c 100644 --- a/.github/workflows/check-npm.yml +++ b/.github/workflows/check-npm.yml @@ -72,6 +72,26 @@ jobs: location: ${{ runner.temp }}/json-schema file-name: jscpd-schema.json + # This schema is referenced by the package.json schema, so must also be accessible. + - name: Download JSON schema for Prettier configuration file + id: download-npm-badges-schema + uses: carlosperate/download-file-action@v2 + with: + # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/npm-badges.json + file-url: https://json.schemastore.org/npm-badges.json + location: ${{ runner.temp }}/json-schema + file-name: npm-badges-schema.json + + # This schema is referenced by the package.json schema, so must also be accessible. + - name: Download JSON schema for ESLint plugins + id: download-partial-eslint-plugins-schema + uses: carlosperate/download-file-action@v2 + with: + # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/partial-eslint-plugins.json + file-url: https://json.schemastore.org/partial-eslint-plugins.json + location: ${{ runner.temp }}/json-schema + file-name: partial-eslint-plugins.json + # This schema is referenced by the package.json schema, so must also be accessible. - name: Download JSON schema for Prettier configuration file id: download-prettierrc-schema @@ -114,6 +134,8 @@ jobs: -r "${{ steps.download-ava-schema.outputs.file-path }}" \ -r "${{ steps.download-eslintrc-schema.outputs.file-path }}" \ -r "${{ steps.download-jscpd-schema.outputs.file-path }}" \ + -r "${{ steps.download-npm-badges-schema.outputs.file-path }}" \ + -r "${{ steps.download-partial-eslint-plugins-schema.outputs.file-path }}" \ -r "${{ steps.download-prettierrc-schema.outputs.file-path }}" \ -r "${{ steps.download-semantic-release-schema.outputs.file-path }}" \ -r "${{ steps.download-stylelintrc-schema.outputs.file-path }}" \ diff --git a/workflow-templates/check-npm.yml b/workflow-templates/check-npm.yml index 740918b..160788c 100644 --- a/workflow-templates/check-npm.yml +++ b/workflow-templates/check-npm.yml @@ -72,6 +72,26 @@ jobs: location: ${{ runner.temp }}/json-schema file-name: jscpd-schema.json + # This schema is referenced by the package.json schema, so must also be accessible. + - name: Download JSON schema for Prettier configuration file + id: download-npm-badges-schema + uses: carlosperate/download-file-action@v2 + with: + # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/npm-badges.json + file-url: https://json.schemastore.org/npm-badges.json + location: ${{ runner.temp }}/json-schema + file-name: npm-badges-schema.json + + # This schema is referenced by the package.json schema, so must also be accessible. + - name: Download JSON schema for ESLint plugins + id: download-partial-eslint-plugins-schema + uses: carlosperate/download-file-action@v2 + with: + # See: https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/partial-eslint-plugins.json + file-url: https://json.schemastore.org/partial-eslint-plugins.json + location: ${{ runner.temp }}/json-schema + file-name: partial-eslint-plugins.json + # This schema is referenced by the package.json schema, so must also be accessible. - name: Download JSON schema for Prettier configuration file id: download-prettierrc-schema @@ -114,6 +134,8 @@ jobs: -r "${{ steps.download-ava-schema.outputs.file-path }}" \ -r "${{ steps.download-eslintrc-schema.outputs.file-path }}" \ -r "${{ steps.download-jscpd-schema.outputs.file-path }}" \ + -r "${{ steps.download-npm-badges-schema.outputs.file-path }}" \ + -r "${{ steps.download-partial-eslint-plugins-schema.outputs.file-path }}" \ -r "${{ steps.download-prettierrc-schema.outputs.file-path }}" \ -r "${{ steps.download-semantic-release-schema.outputs.file-path }}" \ -r "${{ steps.download-stylelintrc-schema.outputs.file-path }}" \