From bd9c24393f4d306794317e22f6aad27dbd798a02 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Thu, 14 Nov 2024 14:55:04 -0500 Subject: [PATCH 1/2] native import attributes parsing --- .ls-lint.yml | 3 +- packages/cli/package.json | 9 +- packages/cli/src/config/rollup.config.js | 23 ++- packages/cli/src/lib/walker-package-ranger.js | 2 +- .../resource/plugin-standard-javascript.js | 3 +- .../build.default.import-node-modules.spec.js | 2 +- ...d.default.workspace-javascript-css.spec.js | 6 +- .../loaders-build.import-attributes.spec.js | 2 +- ...-build.prerender-import-attributes.spec.js | 4 +- ...config.polyfills-import-attributes.spec.js | 2 +- .../serve.config.base-path.spec.js | 2 +- .../serve.default.ssr.spec.js | 2 +- packages/plugin-css-modules/package.json | 5 +- packages/plugin-css-modules/src/index.js | 5 +- packages/plugin-import-commonjs/package.json | 2 +- .../test/cases/default/default.spec.js | 3 +- .../cases/build.default/build.default.spec.js | 2 +- yarn.lock | 163 ++++++++++++++++-- 18 files changed, 191 insertions(+), 49 deletions(-) diff --git a/.ls-lint.yml b/.ls-lint.yml index ab2ad9cba..1d80c1a69 100644 --- a/.ls-lint.yml +++ b/.ls-lint.yml @@ -12,7 +12,8 @@ ls: .woff2: lowercase ignore: - - .git + - .git + - public - node_modules - packages/plugin-babel/node_modules - packages/init/node_modules diff --git a/packages/cli/package.json b/packages/cli/package.json index 20cf4d636..648e223f9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -32,13 +32,12 @@ "access": "public" }, "dependencies": { - "@rollup/plugin-commonjs": "^25.0.0", + "@rollup/plugin-commonjs": "^28.0.0", "@rollup/plugin-node-resolve": "^15.0.0", "@rollup/plugin-replace": "^5.0.5", "@rollup/plugin-terser": "^0.4.4", - "acorn": "^8.0.1", - "acorn-import-attributes": "^1.9.5", - "acorn-walk": "^8.0.0", + "acorn": "^8.14.0", + "acorn-walk": "^8.3.4", "commander": "^2.20.0", "css-tree": "^3.0.0", "es-module-shims": "^1.8.3", @@ -53,7 +52,7 @@ "remark-frontmatter": "^2.0.0", "remark-parse": "^8.0.3", "remark-rehype": "^7.0.0", - "rollup": "^3.29.4", + "rollup": "^4.26.0", "unified": "^9.2.0", "wc-compiler": "~0.15.0" }, diff --git a/packages/cli/src/config/rollup.config.js b/packages/cli/src/config/rollup.config.js index b0bad6bfd..575d0c67f 100644 --- a/packages/cli/src/config/rollup.config.js +++ b/packages/cli/src/config/rollup.config.js @@ -25,7 +25,7 @@ function greenwoodResourceLoader (compilation, browser = false) { return { name: 'greenwood-resource-loader', - async resolveId(id, importer) { + async resolveId(id, importer, options) { const normalizedId = cleanRollupId(id); const { userWorkspace } = compilation.context; @@ -33,11 +33,11 @@ function greenwoodResourceLoader (compilation, browser = false) { // or Greenwood's scratch dir, like when bundling inline