diff --git a/HOW_TO_PUBLISH.md b/HOW_TO_PUBLISH.md index 43a899869..58ed88220 100644 --- a/HOW_TO_PUBLISH.md +++ b/HOW_TO_PUBLISH.md @@ -20,7 +20,7 @@ npm run build:test npm run test:standalone ``` -- Create a branch with the name of the new version number, e.g.: `git checkout -b 1.1.0` +- Create a branch with the name of the new version number, e.g.: `git checkout -b 2.1.0` - Bump the version in the package.json file diff --git a/package-lock.json b/package-lock.json index bba4cf160..1a2bb2244 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prettier-plugin-solidity", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prettier-plugin-solidity", - "version": "2.0.0", + "version": "2.1.0", "license": "MIT", "dependencies": { "@nomicfoundation/slang": "1.2.0", @@ -38,7 +38,7 @@ "ts-loader": "^9.5.2", "ts-node": "^10.9.2", "typescript": "^5.8.3", - "webpack": "^5.99.9", + "webpack": "^5.100.0", "webpack-cli": "^6.0.1" }, "engines": { @@ -1663,10 +1663,11 @@ } }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", @@ -2472,6 +2473,19 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-phases": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.3.tgz", + "integrity": "sha512-jtKLnfoOzm28PazuQ4dVBcE9Jeo6ha1GAJvq3N0LlNOszmTfx+wSycBehn+FN0RnyeR77IBxN/qVYMw0Rlj0Xw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -2877,9 +2891,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001726", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001726.tgz", - "integrity": "sha512-VQAUIUzBiZ/UnlM28fSp2CRF3ivUn1BWEvxMcVTNwpw91Py1pGbPIyIKtd+tzct9C3ouceCVdGAXxZOpZAsgdw==", + "version": "1.0.30001727", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001727.tgz", + "integrity": "sha512-pB68nIHmbN6L/4C6MH1DokyR3bYqFwjaSs/sWDHGj4CTcFtQUQMuJftVwWkXq7mNWOybD3KhUv3oWHoGxgP14Q==", "dev": true, "funding": [ { @@ -3189,10 +3203,11 @@ "dev": true }, "node_modules/enhanced-resolve": { - "version": "5.17.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", - "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", + "version": "5.18.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", + "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -6723,22 +6738,23 @@ } }, "node_modules/webpack": { - "version": "5.99.9", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.9.tgz", - "integrity": "sha512-brOPwM3JnmOa+7kd3NsmOUOwbDAj8FT9xDsG3IW0MgbN9yZV7Oi/s/+MNQ/EcSMqw7qfoRyXPoeEWT8zLVdVGg==", + "version": "5.100.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.100.0.tgz", + "integrity": "sha512-H8yBSBTk+BqxrINJnnRzaxU94SVP2bjd7WmA+PfCphoIdDpeQMJ77pq9/4I7xjLq38cB1bNKfzYPZu8pB3zKtg==", "dev": true, "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.6", + "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", - "acorn": "^8.14.0", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", "browserslist": "^4.24.0", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", + "enhanced-resolve": "^5.17.2", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -6752,7 +6768,7 @@ "tapable": "^2.1.1", "terser-webpack-plugin": "^5.3.11", "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" + "webpack-sources": "^3.3.3" }, "bin": { "webpack": "bin/webpack.js" @@ -6836,10 +6852,11 @@ } }, "node_modules/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", + "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.13.0" } diff --git a/package.json b/package.json index 961aaed90..a21ce8fc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prettier-plugin-solidity", - "version": "2.0.0", + "version": "2.1.0", "description": "A Prettier Plugin for automatically formatting your Solidity code.", "type": "module", "main": "./dist/index.js", @@ -107,7 +107,7 @@ "ts-loader": "^9.5.2", "ts-node": "^10.9.2", "typescript": "^5.8.3", - "webpack": "^5.99.9", + "webpack": "^5.100.0", "webpack-cli": "^6.0.1" }, "dependencies": { diff --git a/src/slang-comments/handlers/handle-struct-comments.ts b/src/slang-comments/handlers/handle-struct-comments.ts index d12204e17..90adc260a 100644 --- a/src/slang-comments/handlers/handle-struct-comments.ts +++ b/src/slang-comments/handlers/handle-struct-comments.ts @@ -1,8 +1,8 @@ import { NonterminalKind } from '@nomicfoundation/slang/cst'; import { util } from 'prettier'; import { locEnd } from '../../slang-utils/loc.js'; -import addCollectionNodeFirstComment from './add-collection-node-first-comment.js'; -import addCollectionNodeLastComment from './add-collection-node-last-comment.js'; +import addCollectionFirstComment from './add-collection-first-comment.js'; +import addCollectionLastComment from './add-collection-last-comment.js'; import type { HandlerParams } from './types.d.ts'; @@ -26,12 +26,12 @@ export default function handleStructComments({ precedingNode?.kind === NonterminalKind.StructMembers && nextCharacter === '}' ) { - addCollectionNodeLastComment(precedingNode, comment); + addCollectionLastComment(precedingNode, comment); return true; } if (followingNode?.kind === NonterminalKind.StructMembers) { - addCollectionNodeFirstComment(followingNode, comment); + addCollectionFirstComment(followingNode, comment); return true; }