diff --git a/codecov.yml b/codecov.yml index f1b170aee..c26c3bd80 100644 --- a/codecov.yml +++ b/codecov.yml @@ -5,6 +5,6 @@ coverage: round: down range: 70...100 status: - project: 'no' - patch: 'yes' -comment: 'off' + project: "no" + patch: "yes" +comment: "off" diff --git a/package.json b/package.json index c4c53c253..3b818222b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "ci:lint": "node scripts/run-changed.js ci:lint", "ci:test": "node scripts/run-changed.js ci:test", "lint": "pnpm run lint:docs && npm run lint:json && pnpm run lint:package && node scripts/run-changed.js lint", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint scripts util", "lint:json": "prettier --write tsconfig.*.json codecov.yml pnpm-workspace.yaml", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", diff --git a/packages/alias/package.json b/packages/alias/package.json index e3fdc0b52..2224eaafd 100755 --- a/packages/alias/package.json +++ b/packages/alias/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/auto-install/package.json b/packages/auto-install/package.json index 287004fb1..94c4c018d 100755 --- a/packages/auto-install/package.json +++ b/packages/auto-install/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", @@ -54,9 +54,7 @@ }, "types": "types/index.d.ts", "ava": { - "babel": { - "compileEnhancements": false - }, + "babel": true, "extensions": [ "ts" ], diff --git a/packages/auto-install/test/npm-bare.js b/packages/auto-install/test/npm-bare.js index 101ddbd62..593082e90 100644 --- a/packages/auto-install/test/npm-bare.js +++ b/packages/auto-install/test/npm-bare.js @@ -15,7 +15,7 @@ const input = join(cwd, '../input.js'); process.chdir(cwd); test('npm, bare', async (t) => { - t.timeout(30000); + t.timeout(50000); await rollup({ input, output: { diff --git a/packages/auto-install/test/npm.js b/packages/auto-install/test/npm.js index b1e00c838..4b102c326 100644 --- a/packages/auto-install/test/npm.js +++ b/packages/auto-install/test/npm.js @@ -17,7 +17,7 @@ const pkgFile = join(cwd, 'package.json'); process.chdir(cwd); test('invalid manager', (t) => { - t.timeout(30000); + t.timeout(50000); const error = t.throws( () => rollup({ @@ -36,7 +36,7 @@ test('invalid manager', (t) => { }); test('npm', async (t) => { - t.timeout(30000); + t.timeout(50000); await rollup({ input, output: { diff --git a/packages/auto-install/test/yarn-bare.js b/packages/auto-install/test/yarn-bare.js index cfa913c02..6b991594e 100644 --- a/packages/auto-install/test/yarn-bare.js +++ b/packages/auto-install/test/yarn-bare.js @@ -15,7 +15,7 @@ const input = join(cwd, '../input.js'); process.chdir(cwd); test('yarn, bare', async (t) => { - t.timeout(30000); + t.timeout(50000); await rollup({ input, output: { diff --git a/packages/auto-install/test/yarn.js b/packages/auto-install/test/yarn.js index cbef6e1c4..70f86e23a 100644 --- a/packages/auto-install/test/yarn.js +++ b/packages/auto-install/test/yarn.js @@ -15,7 +15,7 @@ const input = join(cwd, '../input.js'); process.chdir(cwd); test('yarn', async (t) => { - t.timeout(30000); + t.timeout(50000); await rollup({ input, output: { diff --git a/packages/babel/package.json b/packages/babel/package.json index 36af9524b..f6796b2e3 100644 --- a/packages/babel/package.json +++ b/packages/babel/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/beep/package.json b/packages/beep/package.json index a47c77006..4567045a7 100644 --- a/packages/beep/package.json +++ b/packages/beep/package.json @@ -20,7 +20,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "ava --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache lib test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "test": "ava" diff --git a/packages/buble/package.json b/packages/buble/package.json index bbdb4a5d9..ffc1b1a0b 100644 --- a/packages/buble/package.json +++ b/packages/buble/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/commonjs/README.md b/packages/commonjs/README.md index 4bcd9a9f0..1dd6f0723 100644 --- a/packages/commonjs/README.md +++ b/packages/commonjs/README.md @@ -34,9 +34,9 @@ export default { input: 'src/index.js', output: { dir: 'output', - format: 'cjs' + format: 'cjs', }, - plugins: [commonjs()] + plugins: [commonjs()], }; ``` @@ -66,8 +66,8 @@ commonjs({ '!node_modules/logform/index.js', '!node_modules/logform/format.js', '!node_modules/logform/levels.js', - '!node_modules/logform/browser.js' - ] + '!node_modules/logform/browser.js', + ], }); ``` @@ -157,7 +157,7 @@ import * as foo from 'foo'; ``` This is in line with how other bundlers handle this situation and is also the most likely behaviour in case Node should ever support this. However there are some situations where this may not be desired: - + - There is code in an external dependency that cannot be changed where a `require` statement expects the default export to be returned from an ES module. - If the imported module is in the same bundle, Rollup will generate a namespace object for the imported module which can increase bundle size unnecessarily: @@ -168,15 +168,15 @@ This is in line with how other bundlers handle this situation and is also the mo // input: dep.js export default 'foo'; - + // output var dep = 'foo'; - - var dep$1 = /*#__PURE__*/Object.freeze({ - __proto__: null, - 'default': dep + + var dep$1 = /*#__PURE__*/ Object.freeze({ + __proto__: null, + default: dep, }); - + console.log(dep$1.default); ``` @@ -191,22 +191,26 @@ For these situations, you can change Rollup's behaviour either globally or per m // output import * as dep from 'dep'; - + console.log(dep); ``` - + - `"auto"`: This is complementary to how [`output.exports`](https://rollupjs.org/guide/en/#outputexports): `"auto"` works in Rollup: If a module has a default export and no named exports, requiring that module returns the default export. In all other cases, the namespace is returned. For external dependencies when using `esmExternals: true`, a corresponding interop helper is added: ```js // output import * as dep$1 from 'dep'; - - function getDefaultExportFromNamespaceIfNotNamed (n) { - return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n; + + function getDefaultExportFromNamespaceIfNotNamed(n) { + return n && + Object.prototype.hasOwnProperty.call(n, 'default') && + Object.keys(n).length === 1 + ? n['default'] + : n; } - + var dep = getDefaultExportFromNamespaceIfNotNamed(dep$1); - + console.log(dep); ``` @@ -215,13 +219,15 @@ For these situations, you can change Rollup's behaviour either globally or per m ```js // output import * as dep$1 from 'dep'; - - function getDefaultExportFromNamespaceIfPresent (n) { - return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n; + + function getDefaultExportFromNamespaceIfPresent(n) { + return n && Object.prototype.hasOwnProperty.call(n, 'default') + ? n['default'] + : n; } - + var dep = getDefaultExportFromNamespaceIfPresent(dep$1); - + console.log(dep); ``` @@ -230,7 +236,7 @@ For these situations, you can change Rollup's behaviour either globally or per m ```js // output import dep from 'dep'; - + console.log(dep); ``` @@ -250,9 +256,9 @@ export default { output: { file: 'bundle.js', format: 'iife', - name: 'MyModule' + name: 'MyModule', }, - plugins: [resolve(), commonjs()] + plugins: [resolve(), commonjs()], }; ``` @@ -262,7 +268,7 @@ Symlinks are common in monorepos and are also created by the `npm link` command. ```js commonjs({ - include: /node_modules/ + include: /node_modules/, }); ``` diff --git a/packages/commonjs/package.json b/packages/commonjs/package.json index 64d3bc6dc..732e59496 100644 --- a/packages/commonjs/package.json +++ b/packages/commonjs/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/commonjs/test/fixtures/function/import-esm-require-returns-default-true/main.js b/packages/commonjs/test/fixtures/function/import-esm-require-returns-default-true/main.js index ea9b75548..f1c7ad0b2 100644 --- a/packages/commonjs/test/fixtures/function/import-esm-require-returns-default-true/main.js +++ b/packages/commonjs/test/fixtures/function/import-esm-require-returns-default-true/main.js @@ -1,6 +1,7 @@ const externalNamed = require('external-esm-named'); const externalMixed = require('external-esm-mixed'); const externalDefault = require('external-esm-default'); + const mixedExports = require('./mixed.js'); const defaultExport = require('./default.js'); diff --git a/packages/commonjs/test/fixtures/function/require-esm-with-namespace-named-default/dep.js b/packages/commonjs/test/fixtures/function/require-esm-with-namespace-named-default/dep.js index 67030509f..7f7fdd80d 100644 --- a/packages/commonjs/test/fixtures/function/require-esm-with-namespace-named-default/dep.js +++ b/packages/commonjs/test/fixtures/function/require-esm-with-namespace-named-default/dep.js @@ -1 +1,3 @@ -export * as default from './other.js'; +import * as other from './other.js'; + +export default other; diff --git a/packages/commonjs/test/fixtures/function/transpiled-esm-default/main.js b/packages/commonjs/test/fixtures/function/transpiled-esm-default/main.js index a6f175baf..69f88336d 100644 --- a/packages/commonjs/test/fixtures/function/transpiled-esm-default/main.js +++ b/packages/commonjs/test/fixtures/function/transpiled-esm-default/main.js @@ -1,4 +1,5 @@ import external from 'external-esm-default'; + import dep from './dep'; t.is(dep, 'default'); diff --git a/packages/commonjs/test/fixtures/function/transpiled-esm-mixed/main.js b/packages/commonjs/test/fixtures/function/transpiled-esm-mixed/main.js index b944f13d2..7b84eb8b3 100644 --- a/packages/commonjs/test/fixtures/function/transpiled-esm-mixed/main.js +++ b/packages/commonjs/test/fixtures/function/transpiled-esm-mixed/main.js @@ -1,4 +1,5 @@ import external, { foo } from 'external-esm-mixed'; + import dep, { named } from './dep'; t.is(dep, 'default'); diff --git a/packages/commonjs/test/fixtures/function/transpiled-esm-named/main.js b/packages/commonjs/test/fixtures/function/transpiled-esm-named/main.js index 8042383f7..f0586f566 100644 --- a/packages/commonjs/test/fixtures/function/transpiled-esm-named/main.js +++ b/packages/commonjs/test/fixtures/function/transpiled-esm-named/main.js @@ -1,4 +1,5 @@ import { foo } from 'external-esm-named'; + import { named } from './dep'; t.is(named, 'named'); diff --git a/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-default/main.js b/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-default/main.js index e71369cbe..8263cb00a 100644 --- a/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-default/main.js +++ b/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-default/main.js @@ -1,4 +1,5 @@ import * as external from 'external-esm-default'; + import * as dep from './dep'; t.deepEqual(dep, { diff --git a/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-mixed/main.js b/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-mixed/main.js index 0e871a653..75c7f8d8c 100644 --- a/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-mixed/main.js +++ b/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-mixed/main.js @@ -1,4 +1,5 @@ import * as external from 'external-esm-mixed'; + import * as dep from './dep'; t.deepEqual(dep, { diff --git a/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-named/main.js b/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-named/main.js index b14d3ded4..a275e5964 100644 --- a/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-named/main.js +++ b/packages/commonjs/test/fixtures/function/transpiled-esm-namespace-named/main.js @@ -1,4 +1,5 @@ import * as external from 'external-esm-named'; + import * as dep from './dep'; t.deepEqual(dep, { diff --git a/packages/commonjs/test/snapshots/function.js.md b/packages/commonjs/test/snapshots/function.js.md index e70adf186..913a5d27c 100644 --- a/packages/commonjs/test/snapshots/function.js.md +++ b/packages/commonjs/test/snapshots/function.js.md @@ -2,7 +2,7 @@ The actual snapshot is saved in `function.js.snap`. -Generated by [AVA](https://ava.li). +Generated by [AVA](https://avajs.dev). ## assign-properties-to-default-export @@ -3917,13 +3917,13 @@ Generated by [AVA](https://ava.li). const foo = 'foo';␊ var other = 'bar';␊ ␊ - var dep = /*#__PURE__*/Object.freeze({␊ + var other$1 = /*#__PURE__*/Object.freeze({␊ __proto__: null,␊ foo: foo,␊ 'default': other␊ });␊ ␊ - t.deepEqual(dep, { default: 'bar', foo: 'foo' });␊ + t.deepEqual(other$1, { default: 'bar', foo: 'foo' });␊ ␊ var main = {␊ ␊ diff --git a/packages/commonjs/test/snapshots/function.js.snap b/packages/commonjs/test/snapshots/function.js.snap index 82728dc87..244c8fc65 100644 Binary files a/packages/commonjs/test/snapshots/function.js.snap and b/packages/commonjs/test/snapshots/function.js.snap differ diff --git a/packages/data-uri/package.json b/packages/data-uri/package.json index 0329bbc7c..1b7616180 100644 --- a/packages/data-uri/package.json +++ b/packages/data-uri/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/dsv/package.json b/packages/dsv/package.json index ba03ba82c..978627eeb 100755 --- a/packages/dsv/package.json +++ b/packages/dsv/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/dynamic-import-vars/package.json b/packages/dynamic-import-vars/package.json index d64a9eff0..8d59428a0 100644 --- a/packages/dynamic-import-vars/package.json +++ b/packages/dynamic-import-vars/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/html/package.json b/packages/html/package.json index 2695a87d7..54eaa5a9d 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -20,7 +20,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write *.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write *.md", "lint:js": "eslint --fix --cache lib test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prepublishOnly": "pnpm run lint", diff --git a/packages/image/package.json b/packages/image/package.json index 4dcd4e9eb..de33ad529 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write *.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write *.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/inject/package.json b/packages/inject/package.json index 96b70c714..f951c9de1 100644 --- a/packages/inject/package.json +++ b/packages/inject/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/json/package.json b/packages/json/package.json index 6fb2c3c86..cc2032f2e 100755 --- a/packages/json/package.json +++ b/packages/json/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:json": "prettier --write \"test/fixtures/!(garbage)/*.json\"", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", diff --git a/packages/legacy/package.json b/packages/legacy/package.json index 33debfefe..504576b26 100644 --- a/packages/legacy/package.json +++ b/packages/legacy/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/multi-entry/package.json b/packages/multi-entry/package.json index 7d551ef00..5716dbce7 100755 --- a/packages/multi-entry/package.json +++ b/packages/multi-entry/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/node-resolve/package.json b/packages/node-resolve/package.json index 5bd97a8fe..b51e556b7 100644 --- a/packages/node-resolve/package.json +++ b/packages/node-resolve/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/pluginutils/package.json b/packages/pluginutils/package.json index 0093e27a6..ea06453cb 100644 --- a/packages/pluginutils/package.json +++ b/packages/pluginutils/package.json @@ -24,7 +24,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/replace/package.json b/packages/replace/package.json index b07a42fed..202cd946e 100644 --- a/packages/replace/package.json +++ b/packages/replace/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/run/package.json b/packages/run/package.json index 61f9e861b..3df23985d 100644 --- a/packages/run/package.json +++ b/packages/run/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:json": "prettier --write tsconfig.json", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", diff --git a/packages/run/src/index.ts b/packages/run/src/index.ts index 39f6806a0..20d9d018b 100644 --- a/packages/run/src/index.ts +++ b/packages/run/src/index.ts @@ -17,7 +17,7 @@ export default function run(opts: RollupRunOptions = {}): Plugin { name: 'run', buildStart(options) { - let inputs = options.input!; + let inputs = options.input; if (typeof inputs === 'string') { inputs = [inputs]; diff --git a/packages/strip/package.json b/packages/strip/package.json index 04f9f7e7e..04c8860c3 100644 --- a/packages/strip/package.json +++ b/packages/strip/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "pretest": "pnpm run build", diff --git a/packages/sucrase/package.json b/packages/sucrase/package.json index f41e198e2..424299f03 100644 --- a/packages/sucrase/package.json +++ b/packages/sucrase/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 3b3e64d52..f255e8316 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose --serial", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:json": "prettier --write **/tsconfig.json", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", diff --git a/packages/url/package.json b/packages/url/package.json index 4e23ae948..5487714b0 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/virtual/package.json b/packages/virtual/package.json index a1319a6bd..da8cabf62 100755 --- a/packages/virtual/package.json +++ b/packages/virtual/package.json @@ -19,7 +19,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index e8ee19f94..0ff060a36 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/packages/yaml/package.json b/packages/yaml/package.json index a9d6dba65..a53f06e75 100755 --- a/packages/yaml/package.json +++ b/packages/yaml/package.json @@ -22,7 +22,7 @@ "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", - "lint:docs": "prettier --single-quote --arrow-parens avoid --write README.md", + "lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7baba2c32..07567329f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -145,7 +145,6 @@ importers: devDependencies: '@rollup/plugin-json': 4.1.0_rollup@2.23.0 '@rollup/plugin-node-resolve': 8.4.0_rollup@2.23.0 - acorn: 7.3.1 locate-character: 2.0.5 require-relative: 0.8.7 rollup: 2.23.0 @@ -157,7 +156,6 @@ importers: '@rollup/plugin-json': ^4.1.0 '@rollup/plugin-node-resolve': ^8.4.0 '@rollup/pluginutils': ^3.1.0 - acorn: ^7.3.1 commondir: ^1.0.1 estree-walker: ^2.0.1 glob: ^7.1.6 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 18ec407ef..dee51e928 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,2 @@ packages: - - 'packages/*' + - "packages/*"