diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 77f9bd54..770f20c3 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -16,13 +16,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Setup pnpm - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 + uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - name: Setup Node.js LTS - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: lts/* cache: pnpm diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5990243..02cbfc1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,13 +32,13 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Setup pnpm - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 + uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - name: Setup Node.js ${{ matrix.node }} - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ matrix.node }} cache: pnpm diff --git a/.github/workflows/pkg-pr-new.yml b/.github/workflows/pkg-pr-new.yml index 007720fe..b27f64f8 100644 --- a/.github/workflows/pkg-pr-new.yml +++ b/.github/workflows/pkg-pr-new.yml @@ -13,13 +13,13 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Setup pnpm - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 + uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - name: Setup Node.js LTS - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: lts/* cache: pnpm diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7c21d51..6a62e01a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,17 +20,20 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - name: Setup pnpm - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 + uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 - name: Setup Node.js LTS - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: lts/* cache: pnpm + - name: Upgrade npm + run: npm install -g npm@latest + - name: Install Dependencies run: pnpm install --prefer-frozen-lockfile @@ -43,5 +46,4 @@ jobs: title: 'chore: release eslint-plugin-prettier' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NPM_CONFIG_PROVENANCE: true - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NPM_TOKEN: '' diff --git a/CHANGELOG.md b/CHANGELOG.md index e7c305d3..87a57208 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.5.5 + +### Patch Changes + +- [#772](https://github.com/prettier/eslint-plugin-prettier/pull/772) [`7264ed0`](https://github.com/prettier/eslint-plugin-prettier/commit/7264ed0a6cf47fc36befed32f459e7d875f5992c) Thanks [@BPScott](https://github.com/BPScott)! - Bump prettier-linter-helpers dependency to v1.0.1 + +- [#776](https://github.com/prettier/eslint-plugin-prettier/pull/776) [`77651a3`](https://github.com/prettier/eslint-plugin-prettier/commit/77651a33cd16fd4c50b7346971990b900a42408b) Thanks [@aswils](https://github.com/aswils)! - fix: bump synckit for yarn PnP ESM issue + ## 5.5.4 ### Patch Changes diff --git a/eslint-plugin-prettier.js b/eslint-plugin-prettier.js index 0ef19af9..7a6eceda 100644 --- a/eslint-plugin-prettier.js +++ b/eslint-plugin-prettier.js @@ -102,7 +102,9 @@ function getLocFromIndex(sourceCode, index) { * @returns {void} */ function reportDifference(context, difference) { - const { operation, offset, deleteText = '', insertText = '' } = difference; + const { operation, offset } = difference; + const insertText = 'insertText' in difference ? difference.insertText : ''; + const deleteText = 'deleteText' in difference ? difference.deleteText : ''; /** @type {AST.Range} */ const range = [offset, offset + deleteText.length]; // `context.getSourceCode()` was deprecated in ESLint v8.40.0 and replaced diff --git a/package.json b/package.json index 2c76b68c..f953c029 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-prettier", - "version": "5.5.4", + "version": "5.5.5", "description": "Runs prettier as an eslint rule", "repository": "https://github.com/prettier/eslint-plugin-prettier.git", "homepage": "https://github.com/prettier/eslint-plugin-prettier#readme", @@ -63,8 +63,8 @@ } }, "dependencies": { - "prettier-linter-helpers": "^1.0.0", - "synckit": "^0.11.7" + "prettier-linter-helpers": "^1.0.1", + "synckit": "^0.11.12" }, "devDependencies": { "@1stg/remark-preset": "^3.0.1", @@ -78,7 +78,6 @@ "@graphql-eslint/eslint-plugin": "^4.3.0", "@html-eslint/parser": "^0.44.0", "@prettier/plugin-pug": "^3.2.1", - "@types/prettier-linter-helpers": "^1.0.4", "clean-pkg-json": "^1.2.1", "eslint": "^9.23.0", "eslint-config-prettier": "^10.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 90c1e816..2433bcf2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,7 +20,6 @@ specifiers: '@graphql-eslint/eslint-plugin': ^4.3.0 '@html-eslint/parser': ^0.44.0 '@prettier/plugin-pug': ^3.2.1 - '@types/prettier-linter-helpers': ^1.0.4 clean-pkg-json: ^1.2.1 eslint: ^9.23.0 eslint-config-prettier: ^10.1.1 @@ -35,17 +34,17 @@ specifiers: lint-staged: ^16.0.0 mocha: ^11.1.0 prettier: ^3.6.1 - prettier-linter-helpers: ^1.0.0 + prettier-linter-helpers: ^1.0.1 prettier-plugin-pkg: ^0.21.0 prettier-plugin-svelte: ^3.3.3 simple-git-hooks: ^2.12.1 svelte: ^5.25.3 - synckit: ^0.11.7 + synckit: ^0.11.12 vue-eslint-parser: ^10.1.1 dependencies: - prettier-linter-helpers: 1.0.0 - synckit: 0.11.7 + prettier-linter-helpers: 1.0.1 + synckit: 0.11.12 devDependencies: '@1stg/remark-preset': 3.0.1_prettier@3.6.1 @@ -59,7 +58,6 @@ devDependencies: '@graphql-eslint/eslint-plugin': 4.3.0_garjxkg63rquziivo3mxre4wya '@html-eslint/parser': 0.44.0 '@prettier/plugin-pug': 3.2.1_prettier@3.6.1 - '@types/prettier-linter-helpers': 1.0.4 clean-pkg-json: 1.2.1 eslint: 9.23.0 eslint-config-prettier: 10.1.1_eslint@9.23.0 @@ -1303,8 +1301,8 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@pkgr/core/0.2.4: - resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} + /@pkgr/core/0.2.9: + resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: false @@ -1402,10 +1400,6 @@ packages: undici-types: 6.20.0 dev: true - /@types/prettier-linter-helpers/1.0.4: - resolution: {integrity: sha512-ZGhi9aiUREt6bUsqdArRElJFay8b+C1IjbF0ETRFVBJd/g6bAiwzRIgqyepZo+LiESL2d2tdTXOPWIrcj+AMpw==} - dev: true - /@types/supports-color/8.1.3: resolution: {integrity: sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==} dev: true @@ -4348,8 +4342,8 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier-linter-helpers/1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + /prettier-linter-helpers/1.0.1: + resolution: {integrity: sha512-SxToR7P8Y2lWmv/kTzVLC1t/GDI2WGjMwNhLLE9qtH8Q13C+aEmuRlzDst4Up4s0Wc8sF2M+J57iB3cMLqftfg==} engines: {node: '>=6.0.0'} dependencies: fast-diff: 1.3.0 @@ -5568,11 +5562,11 @@ packages: whatwg-mimetype: 4.0.0 dev: true - /synckit/0.11.7: - resolution: {integrity: sha512-/5aUeiRPqmY0CRTJ+iVWfOOMHWTDh8JAIuNF1A6nZ2/RdCNWwKaUrO5Qw5ephLK6dYa7NclYBI0ahdgUECvdhA==} + /synckit/0.11.12: + resolution: {integrity: sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==} engines: {node: ^14.18.0 || >=16.0.0} dependencies: - '@pkgr/core': 0.2.4 + '@pkgr/core': 0.2.9 dev: false /synckit/0.9.2: