From 545aa6a608b68b9fb78f5df56da0e1e09b537d58 Mon Sep 17 00:00:00 2001 From: Caleb Pollman Date: Thu, 26 Sep 2024 10:10:53 -0700 Subject: [PATCH] chore(rollup): upgrade rollup deps, migrate to mjs config file, enforce linting on mjs files (#5830) Co-authored-by: Danny Banks --- .changeset/good-bats-teach.md | 16 ++ package.json | 8 +- packages/react-ai/.eslintrc.js | 5 +- packages/react-ai/.lintstagedrc.js | 2 +- packages/react-ai/package.json | 3 +- .../{rollup.config.ts => rollup.config.mjs} | 16 +- packages/react-ai/tsconfig.json | 2 +- packages/react-auth/.eslintrc.js | 5 +- packages/react-auth/.lintstagedrc.js | 2 +- packages/react-auth/package.json | 2 +- .../rollup.config.mjs} | 16 +- packages/react-auth/tsconfig.json | 2 +- packages/react-core-auth/.eslintrc.js | 5 +- packages/react-core-auth/.lintstagedrc.js | 2 +- packages/react-core-auth/package.json | 2 +- .../{rollup.config.ts => rollup.config.mjs} | 13 +- packages/react-core-auth/tsconfig.json | 2 +- .../react-core-notifications/.eslintrc.js | 5 +- .../react-core-notifications/.lintstagedrc.js | 2 +- .../react-core-notifications/package.json | 2 +- .../{rollup.config.ts => rollup.config.mjs} | 16 +- .../react-core-notifications/tsconfig.json | 2 +- packages/react-core/.eslintrc.js | 3 +- packages/react-core/.lintstagedrc.js | 2 +- packages/react-core/elements/package.json | 2 +- packages/react-core/package.json | 4 +- .../{rollup.config.ts => rollup.config.mjs} | 13 +- packages/react-core/tsconfig.json | 2 +- packages/react-geo/.eslintrc.js | 5 +- packages/react-geo/.lintstagedrc.js | 2 +- packages/react-geo/package.json | 2 +- .../rollup.config.mjs} | 16 +- packages/react-geo/tsconfig.json | 2 +- packages/react-liveness/.eslintrc.js | 6 +- packages/react-liveness/.lintstagedrc.js | 2 +- packages/react-liveness/package.json | 3 +- .../{rollup.config.ts => rollup.config.mjs} | 16 +- packages/react-liveness/tsconfig.json | 2 +- packages/react-native-auth/.eslintrc.js | 2 +- packages/react-native/.eslintrc.js | 2 +- .../__tests__/withAuthenticator.spec.tsx | 10 +- packages/react-notifications/.eslintrc.js | 5 +- packages/react-notifications/.lintstagedrc.js | 2 +- packages/react-notifications/package.json | 2 +- .../rollup.config.mjs} | 16 +- packages/react-notifications/tsconfig.json | 2 +- packages/react-storage/.eslintrc.js | 5 +- packages/react-storage/.lintstagedrc.js | 2 +- packages/react-storage/package.json | 2 +- packages/react-storage/rollup.config.mjs | 60 ++++ packages/react-storage/rollup.config.ts | 56 ---- packages/react-storage/tsconfig.json | 2 +- packages/react/.eslintrc.js | 6 +- packages/react/.lintstagedrc.js | 2 +- packages/react/package.json | 2 +- .../{rollup.config.ts => rollup.config.mjs} | 23 +- packages/react/tsconfig.json | 10 +- packages/ui/.eslintrc.js | 38 ++- packages/ui/.lintstagedrc.js | 2 +- .../{rollup.config.ts => rollup.config.mjs} | 13 +- .../authenticator/formFields/defaults.ts | 8 +- .../machines/authenticator/defaultServices.ts | 8 +- .../ui/src/theme/components/buttonGroup.ts | 3 +- .../ui/src/theme/components/checkboxField.ts | 3 +- .../ui/src/theme/components/selectField.ts | 3 +- .../theme/createTheme/createComponentCSS.ts | 2 +- packages/ui/tsconfig.dist.json | 1 + packages/ui/tsconfig.json | 2 +- yarn.lock | 266 ++++++++++-------- 69 files changed, 459 insertions(+), 313 deletions(-) create mode 100644 .changeset/good-bats-teach.md rename packages/react-ai/{rollup.config.ts => rollup.config.mjs} (84%) rename packages/{react-notifications/rollup.config.ts => react-auth/rollup.config.mjs} (84%) rename packages/react-core-auth/{rollup.config.ts => rollup.config.mjs} (81%) rename packages/react-core-notifications/{rollup.config.ts => rollup.config.mjs} (80%) rename packages/react-core/{rollup.config.ts => rollup.config.mjs} (82%) rename packages/{react-auth/rollup.config.ts => react-geo/rollup.config.mjs} (84%) rename packages/react-liveness/{rollup.config.ts => rollup.config.mjs} (85%) rename packages/{react-geo/rollup.config.ts => react-notifications/rollup.config.mjs} (84%) create mode 100644 packages/react-storage/rollup.config.mjs delete mode 100644 packages/react-storage/rollup.config.ts rename packages/react/{rollup.config.ts => rollup.config.mjs} (74%) rename packages/ui/{rollup.config.ts => rollup.config.mjs} (80%) diff --git a/.changeset/good-bats-teach.md b/.changeset/good-bats-teach.md new file mode 100644 index 00000000000..b0c8cec3c35 --- /dev/null +++ b/.changeset/good-bats-teach.md @@ -0,0 +1,16 @@ +--- +"@aws-amplify/ui-angular": patch +"@aws-amplify/ui-react": patch +"@aws-amplify/ui-react-ai": patch +"@aws-amplify/ui-react-core": patch +"@aws-amplify/ui-react-core-notifications": patch +"@aws-amplify/ui-react-geo": patch +"@aws-amplify/ui-react-liveness": patch +"@aws-amplify/ui-react-native": patch +"@aws-amplify/ui-react-notifications": patch +"@aws-amplify/ui-react-storage": patch +"@aws-amplify/ui": patch +"@aws-amplify/ui-vue": patch +--- + +chore(rollup): upgrade rollup deps, migrate to mjs config file, enforce linting on mjs files diff --git a/package.json b/package.json index d5bf3f939ba..b6458816d15 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "react-dom": "18.2.0", "react-native": "0.71.16", "react-devtools-core": "^4.28.4", + "rollup": "^4.22.4", "send": "^0.19.0", "shell-quote": "1.7.3", "socks": "^2.7.3", @@ -112,7 +113,8 @@ "@aws-amplify/typescript-config": "0.0.0", "@changesets/changelog-github": "0.4.1", "@changesets/cli": "^2.26.2", - "@rollup/plugin-typescript": "^11.1.4", + "@rollup/plugin-commonjs": "^28.0.0", + "@rollup/plugin-typescript": "^12.1.0", "@size-limit/preset-big-lib": "^11.1.5", "@testing-library/jest-dom": "^6.1.5", "@testing-library/react": "^14.0.0", @@ -133,8 +135,8 @@ "prettier": "^3.0.3", "react-test-renderer": "^18.2.0", "rimraf": "^3.0.2", - "rollup": "^2.70.0", - "rollup-plugin-node-externals": "^4.1.1", + "rollup": "^4.22.4", + "rollup-plugin-node-externals": "^7.1.3", "rollup-plugin-styles": "^4.0.0", "ts-jest": "^29.1.1", "ts-morph": "^17.0.0", diff --git a/packages/react-ai/.eslintrc.js b/packages/react-ai/.eslintrc.js index 01881b7770c..20abf138bf1 100644 --- a/packages/react-ai/.eslintrc.js +++ b/packages/react-ai/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], - ignorePatterns: ['.eslintrc.js', 'dist', 'rollup.config.ts'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-ai/.lintstagedrc.js b/packages/react-ai/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-ai/.lintstagedrc.js +++ b/packages/react-ai/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-ai/package.json b/packages/react-ai/package.json index 73c135d5c4f..a2c3c28236c 100644 --- a/packages/react-ai/package.json +++ b/packages/react-ai/package.json @@ -34,7 +34,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-ai\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", @@ -53,7 +53,6 @@ "@aws-amplify/ui-react-core": "^3.0.25" }, "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.1", "@types/jest-when": "^3.5.0", "jest-when": "^3.5.1" } diff --git a/packages/react-ai/rollup.config.ts b/packages/react-ai/rollup.config.mjs similarity index 84% rename from packages/react-ai/rollup.config.ts rename to packages/react-ai/rollup.config.mjs index 9d52adbc7b9..9ce25b8b8b2 100644 --- a/packages/react-ai/rollup.config.ts +++ b/packages/react-ai/rollup.config.mjs @@ -8,14 +8,22 @@ const input = ['src/index.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-ai/tsconfig.json b/packages/react-ai/tsconfig.json index 0a3c771d4f1..87c5973375e 100644 --- a/packages/react-ai/tsconfig.json +++ b/packages/react-ai/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["jest.*.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.ts", "*.mjs", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-auth/.eslintrc.js b/packages/react-auth/.eslintrc.js index 01881b7770c..20abf138bf1 100644 --- a/packages/react-auth/.eslintrc.js +++ b/packages/react-auth/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], - ignorePatterns: ['.eslintrc.js', 'dist', 'rollup.config.ts'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-auth/.lintstagedrc.js b/packages/react-auth/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-auth/.lintstagedrc.js +++ b/packages/react-auth/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-auth/package.json b/packages/react-auth/package.json index 37798d008b8..4221643e42d 100644 --- a/packages/react-auth/package.json +++ b/packages/react-auth/package.json @@ -32,7 +32,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-auth\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", diff --git a/packages/react-notifications/rollup.config.ts b/packages/react-auth/rollup.config.mjs similarity index 84% rename from packages/react-notifications/rollup.config.ts rename to packages/react-auth/rollup.config.mjs index 6c35132a539..e9c6dcf5917 100644 --- a/packages/react-notifications/rollup.config.ts +++ b/packages/react-auth/rollup.config.mjs @@ -8,14 +8,22 @@ const input = ['src/index.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-auth/tsconfig.json b/packages/react-auth/tsconfig.json index 011b8c8ce56..87c5973375e 100644 --- a/packages/react-auth/tsconfig.json +++ b/packages/react-auth/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["jest.config.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.ts", "*.mjs", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-core-auth/.eslintrc.js b/packages/react-core-auth/.eslintrc.js index 21a5fd6ecaf..20abf138bf1 100644 --- a/packages/react-core-auth/.eslintrc.js +++ b/packages/react-core-auth/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], - ignorePatterns: ['.eslintrc.js', 'dist'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-core-auth/.lintstagedrc.js b/packages/react-core-auth/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-core-auth/.lintstagedrc.js +++ b/packages/react-core-auth/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-core-auth/package.json b/packages/react-core-auth/package.json index 5894ccaea08..c449320094d 100644 --- a/packages/react-core-auth/package.json +++ b/packages/react-core-auth/package.json @@ -26,7 +26,7 @@ "clean": "rimraf dist node_modules", "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-core-auth\"'", "dev": "yarn build --watch", - "lint": "yarn typecheck && eslint src", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "test": "jest", "test:watch": "yarn test --watch", diff --git a/packages/react-core-auth/rollup.config.ts b/packages/react-core-auth/rollup.config.mjs similarity index 81% rename from packages/react-core-auth/rollup.config.ts rename to packages/react-core-auth/rollup.config.mjs index 1aa5fec3e74..384d4cf7287 100644 --- a/packages/react-core-auth/rollup.config.ts +++ b/packages/react-core-auth/rollup.config.mjs @@ -9,11 +9,22 @@ const tsconfig = 'tsconfig.dist.json'; const esmOutputDir = 'dist/esm'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { dir: 'dist', format: 'cjs' }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-core-auth/tsconfig.json b/packages/react-core-auth/tsconfig.json index 3367c8f399c..5be1de00eac 100644 --- a/packages/react-core-auth/tsconfig.json +++ b/packages/react-core-auth/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["*.config.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-core-notifications/.eslintrc.js b/packages/react-core-notifications/.eslintrc.js index 21a5fd6ecaf..20abf138bf1 100644 --- a/packages/react-core-notifications/.eslintrc.js +++ b/packages/react-core-notifications/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], - ignorePatterns: ['.eslintrc.js', 'dist'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-core-notifications/.lintstagedrc.js b/packages/react-core-notifications/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-core-notifications/.lintstagedrc.js +++ b/packages/react-core-notifications/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-core-notifications/package.json b/packages/react-core-notifications/package.json index 968a3a5d0d7..22e179e2f3e 100644 --- a/packages/react-core-notifications/package.json +++ b/packages/react-core-notifications/package.json @@ -28,7 +28,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-core-notifications\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "test": "jest", "test:watch": "yarn test --watch", diff --git a/packages/react-core-notifications/rollup.config.ts b/packages/react-core-notifications/rollup.config.mjs similarity index 80% rename from packages/react-core-notifications/rollup.config.ts rename to packages/react-core-notifications/rollup.config.mjs index f029c17b480..9e95ba888db 100644 --- a/packages/react-core-notifications/rollup.config.ts +++ b/packages/react-core-notifications/rollup.config.mjs @@ -7,14 +7,22 @@ const input = ['src/index.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-core-notifications/tsconfig.json b/packages/react-core-notifications/tsconfig.json index 3367c8f399c..5be1de00eac 100644 --- a/packages/react-core-notifications/tsconfig.json +++ b/packages/react-core-notifications/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["*.config.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-core/.eslintrc.js b/packages/react-core/.eslintrc.js index 5fb06efacb6..cbfea28f62b 100644 --- a/packages/react-core/.eslintrc.js +++ b/packages/react-core/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { extends: '@aws-amplify/amplify-ui/react', - ignorePatterns: ['.eslintrc.js', 'dist'], + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: '@aws-amplify/amplify-ui/jest', files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-core/.lintstagedrc.js b/packages/react-core/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-core/.lintstagedrc.js +++ b/packages/react-core/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-core/elements/package.json b/packages/react-core/elements/package.json index d9cde1eb883..558c4d0a2a9 100644 --- a/packages/react-core/elements/package.json +++ b/packages/react-core/elements/package.json @@ -1,6 +1,6 @@ { "name": "@aws-amplify/ui-react-core/elements", "main": "../dist/elements.js", - "module": "../dist/esm/elements/elements.mjs", + "module": "../dist/esm/elements.mjs", "types": "../dist/types/elements/index.d.ts" } diff --git a/packages/react-core/package.json b/packages/react-core/package.json index 5cc2a0e8efd..3f9fa4a8cb5 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -11,7 +11,7 @@ "types": "./dist/types/index.d.ts" }, "./elements": { - "import": "./dist/esm/elements/elements.mjs", + "import": "./dist/esm/elements.mjs", "require": "./dist/elements.js", "react-native": "./src/elements/index.ts", "types": "./dist/types/elements/index.d.ts" @@ -33,7 +33,7 @@ "build": "rollup --config", "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-core\"'", "dev": "yarn build --watch", - "lint": "yarn typecheck && eslint src", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "test": "jest", "test:watch": "yarn test --watch", diff --git a/packages/react-core/rollup.config.ts b/packages/react-core/rollup.config.mjs similarity index 82% rename from packages/react-core/rollup.config.ts rename to packages/react-core/rollup.config.mjs index cf4a7f4eb4d..9545c57ca22 100644 --- a/packages/react-core/rollup.config.ts +++ b/packages/react-core/rollup.config.mjs @@ -11,11 +11,22 @@ const tsconfig = 'tsconfig.dist.json'; const esmOutputDir = 'dist/esm'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { dir: 'dist', format: 'cjs' }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-core/tsconfig.json b/packages/react-core/tsconfig.json index 3367c8f399c..5be1de00eac 100644 --- a/packages/react-core/tsconfig.json +++ b/packages/react-core/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["*.config.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-geo/.eslintrc.js b/packages/react-geo/.eslintrc.js index 7e6b324ee6b..20abf138bf1 100644 --- a/packages/react-geo/.eslintrc.js +++ b/packages/react-geo/.eslintrc.js @@ -1,12 +1,13 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, - ignorePatterns: ['.eslintrc.js', 'dist', 'rollup.config.ts'], overrides: [ { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-geo/.lintstagedrc.js b/packages/react-geo/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-geo/.lintstagedrc.js +++ b/packages/react-geo/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-geo/package.json b/packages/react-geo/package.json index 6902f8419fd..984d0db4b7d 100644 --- a/packages/react-geo/package.json +++ b/packages/react-geo/package.json @@ -31,7 +31,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-geo\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", diff --git a/packages/react-auth/rollup.config.ts b/packages/react-geo/rollup.config.mjs similarity index 84% rename from packages/react-auth/rollup.config.ts rename to packages/react-geo/rollup.config.mjs index 6c35132a539..e9c6dcf5917 100644 --- a/packages/react-auth/rollup.config.ts +++ b/packages/react-geo/rollup.config.mjs @@ -8,14 +8,22 @@ const input = ['src/index.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-geo/tsconfig.json b/packages/react-geo/tsconfig.json index 0a3c771d4f1..5be1de00eac 100644 --- a/packages/react-geo/tsconfig.json +++ b/packages/react-geo/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["jest.*.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-liveness/.eslintrc.js b/packages/react-liveness/.eslintrc.js index 1bf10ecd4f8..b30b51862a4 100644 --- a/packages/react-liveness/.eslintrc.js +++ b/packages/react-liveness/.eslintrc.js @@ -1,9 +1,10 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], + extends: '@aws-amplify/amplify-ui/react', ignorePatterns: [ '.eslintrc.js', + 'coverage', 'dist', - 'rollup.config.ts', + 'node_modules', // NOTE: remove to turn on linting for test files '__tests__', @@ -15,5 +16,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-liveness/.lintstagedrc.js b/packages/react-liveness/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-liveness/.lintstagedrc.js +++ b/packages/react-liveness/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-liveness/package.json b/packages/react-liveness/package.json index a434fcb3551..7b40d2462a9 100644 --- a/packages/react-liveness/package.json +++ b/packages/react-liveness/package.json @@ -34,7 +34,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-liveness\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", @@ -69,7 +69,6 @@ "xstate": "^4.33.6" }, "devDependencies": { - "@rollup/plugin-commonjs": "^22.0.1", "@types/jest-when": "^3.5.0", "blob-polyfill": "^7.0.20220408", "jest-canvas-mock": "^2.5.2", diff --git a/packages/react-liveness/rollup.config.ts b/packages/react-liveness/rollup.config.mjs similarity index 85% rename from packages/react-liveness/rollup.config.ts rename to packages/react-liveness/rollup.config.mjs index 74e96af7c40..2593aaa3df3 100644 --- a/packages/react-liveness/rollup.config.ts +++ b/packages/react-liveness/rollup.config.mjs @@ -10,14 +10,22 @@ const input = ['src/index.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ commonjs(), externals({ include: /^@aws-amplify/ }), diff --git a/packages/react-liveness/tsconfig.json b/packages/react-liveness/tsconfig.json index 0a3c771d4f1..5be1de00eac 100644 --- a/packages/react-liveness/tsconfig.json +++ b/packages/react-liveness/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["jest.*.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-native-auth/.eslintrc.js b/packages/react-native-auth/.eslintrc.js index 867ac2e9711..006b4778bfa 100644 --- a/packages/react-native-auth/.eslintrc.js +++ b/packages/react-native-auth/.eslintrc.js @@ -1,5 +1,5 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], + extends: '@aws-amplify/amplify-ui/react', ignorePatterns: ['.eslintrc.js', 'babel.config.js', 'dist', 'lib'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, diff --git a/packages/react-native/.eslintrc.js b/packages/react-native/.eslintrc.js index 490a917bb43..a96c7e5f47f 100644 --- a/packages/react-native/.eslintrc.js +++ b/packages/react-native/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { ignorePatterns: ['.eslintrc.js', 'babel.config.js', 'dist', 'lib'], - extends: ['@aws-amplify/amplify-ui/react'], + extends: '@aws-amplify/amplify-ui/react', overrides: [ { extends: ['@aws-amplify/amplify-ui/jest'], diff --git a/packages/react-native/src/Authenticator/__tests__/withAuthenticator.spec.tsx b/packages/react-native/src/Authenticator/__tests__/withAuthenticator.spec.tsx index cbc7e401969..739b185fa44 100644 --- a/packages/react-native/src/Authenticator/__tests__/withAuthenticator.spec.tsx +++ b/packages/react-native/src/Authenticator/__tests__/withAuthenticator.spec.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { Text } from 'react-native'; -import { render } from '@testing-library/react-native'; +import { waitFor, render } from '@testing-library/react-native'; import * as UIReactCoreModule from '@aws-amplify/ui-react-core'; import { @@ -53,7 +53,9 @@ describe('withAuthenticator', () => { const { toJSON, queryByTestId } = render(); - expect(queryByTestId(CHILD_TEST_ID)).toBeNull(); + waitFor(() => { + expect(queryByTestId(CHILD_TEST_ID)).toBeNull(); + }); expect(toJSON()).toMatchSnapshot(); }); @@ -67,7 +69,9 @@ describe('withAuthenticator', () => { const { toJSON, getByTestId } = render(); - expect(getByTestId(CHILD_TEST_ID)).toBeDefined(); + waitFor(() => { + expect(getByTestId(CHILD_TEST_ID)).toBeDefined(); + }); expect(toJSON()).toMatchSnapshot(); }); }); diff --git a/packages/react-notifications/.eslintrc.js b/packages/react-notifications/.eslintrc.js index 01881b7770c..20abf138bf1 100644 --- a/packages/react-notifications/.eslintrc.js +++ b/packages/react-notifications/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], - ignorePatterns: ['.eslintrc.js', 'dist', 'rollup.config.ts'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-notifications/.lintstagedrc.js b/packages/react-notifications/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-notifications/.lintstagedrc.js +++ b/packages/react-notifications/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-notifications/package.json b/packages/react-notifications/package.json index 8c884ba0195..d4a8e4d54f5 100644 --- a/packages/react-notifications/package.json +++ b/packages/react-notifications/package.json @@ -31,7 +31,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-notifications\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", diff --git a/packages/react-geo/rollup.config.ts b/packages/react-notifications/rollup.config.mjs similarity index 84% rename from packages/react-geo/rollup.config.ts rename to packages/react-notifications/rollup.config.mjs index 6c35132a539..e9c6dcf5917 100644 --- a/packages/react-geo/rollup.config.ts +++ b/packages/react-notifications/rollup.config.mjs @@ -8,14 +8,22 @@ const input = ['src/index.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/react-notifications/tsconfig.json b/packages/react-notifications/tsconfig.json index 0a3c771d4f1..5be1de00eac 100644 --- a/packages/react-notifications/tsconfig.json +++ b/packages/react-notifications/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["jest.*.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react-storage/.eslintrc.js b/packages/react-storage/.eslintrc.js index 01881b7770c..20abf138bf1 100644 --- a/packages/react-storage/.eslintrc.js +++ b/packages/react-storage/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], - ignorePatterns: ['.eslintrc.js', 'dist', 'rollup.config.ts'], + extends: '@aws-amplify/amplify-ui/react', + ignorePatterns: ['.eslintrc.js', 'coverage', 'dist', 'node_modules'], // point to local tsconfig parserOptions: { project: ['tsconfig.json'], tsconfigRootDir: __dirname }, overrides: [ @@ -8,5 +8,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react-storage/.lintstagedrc.js b/packages/react-storage/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react-storage/.lintstagedrc.js +++ b/packages/react-storage/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react-storage/package.json b/packages/react-storage/package.json index d433d6038c2..abdc5ec2e24 100644 --- a/packages/react-storage/package.json +++ b/packages/react-storage/package.json @@ -31,7 +31,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react-storage\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", diff --git a/packages/react-storage/rollup.config.mjs b/packages/react-storage/rollup.config.mjs new file mode 100644 index 00000000000..ca3323488ed --- /dev/null +++ b/packages/react-storage/rollup.config.mjs @@ -0,0 +1,60 @@ +import { defineConfig } from 'rollup'; +import typescript from '@rollup/plugin-typescript'; +import styles from 'rollup-plugin-styles'; +import externals from 'rollup-plugin-node-externals'; + +// common config settings +const input = ['src/index.ts']; +const sourceMap = false; +const tsconfig = 'tsconfig.dist.json'; + +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + +const config = defineConfig([ + // CJS config + { + input, + output: cjsOutput, + plugins: [ + externals({ include: /^@aws-amplify/ }), + typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), + ], + }, + // ESM config + { + input, + output: { + dir: 'dist/esm', + format: 'es', + entryFileNames: '[name].mjs', + preserveModules: true, + preserveModulesRoot: 'src', + }, + plugins: [ + externals({ include: /^@aws-amplify/ }), + typescript({ + outDir: 'dist/esm', + declaration: false, + sourceMap, + tsconfig, + }), + ], + }, + // CSS config + { + input: 'src/styles.ts', + output: { dir: 'dist', format: 'cjs', assetFileNames: '[name][extname]' }, + plugins: [styles({ mode: ['extract'] })], + }, +]); + +export default config; diff --git a/packages/react-storage/rollup.config.ts b/packages/react-storage/rollup.config.ts deleted file mode 100644 index 6c35132a539..00000000000 --- a/packages/react-storage/rollup.config.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { defineConfig } from 'rollup'; -import typescript from '@rollup/plugin-typescript'; -import styles from 'rollup-plugin-styles'; -import externals from 'rollup-plugin-node-externals'; - -// common config settings -const input = ['src/index.ts']; -const sourceMap = false; -const tsconfig = 'tsconfig.dist.json'; - -const config = defineConfig([ - // CJS config - { - input, - output: { - dir: 'dist', - format: 'cjs', - }, - plugins: [ - externals({ include: /^@aws-amplify/ }), - typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), - ], - }, - // ESM config - { - input, - output: { - dir: 'dist/esm', - format: 'es', - entryFileNames: '[name].mjs', - preserveModules: true, - preserveModulesRoot: 'src', - }, - plugins: [ - externals({ include: /^@aws-amplify/ }), - typescript({ - outDir: 'dist/esm', - declaration: false, - sourceMap, - tsconfig, - }), - ], - }, - // CSS config - { - input: 'src/styles.ts', - output: { - dir: 'dist', - format: 'cjs', - assetFileNames: '[name][extname]', - }, - plugins: [styles({ mode: ['extract'] })], - }, -]); - -export default config; diff --git a/packages/react-storage/tsconfig.json b/packages/react-storage/tsconfig.json index 0a3c771d4f1..5be1de00eac 100644 --- a/packages/react-storage/tsconfig.json +++ b/packages/react-storage/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@aws-amplify/typescript-config/tsconfig.react.json", - "include": ["jest.*.ts", "src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "src/**/*.ts", "src/**/*.tsx"], "exclude": ["node_modules"] } diff --git a/packages/react/.eslintrc.js b/packages/react/.eslintrc.js index 1bf10ecd4f8..b30b51862a4 100644 --- a/packages/react/.eslintrc.js +++ b/packages/react/.eslintrc.js @@ -1,9 +1,10 @@ module.exports = { - extends: ['@aws-amplify/amplify-ui/react'], + extends: '@aws-amplify/amplify-ui/react', ignorePatterns: [ '.eslintrc.js', + 'coverage', 'dist', - 'rollup.config.ts', + 'node_modules', // NOTE: remove to turn on linting for test files '__tests__', @@ -15,5 +16,6 @@ module.exports = { extends: ['@aws-amplify/amplify-ui/jest'], files: ['**/__mocks__/**', '**/__tests__/**'], }, + { files: '*.mjs' }, ], }; diff --git a/packages/react/.lintstagedrc.js b/packages/react/.lintstagedrc.js index ced1a0d521c..93308787ef1 100644 --- a/packages/react/.lintstagedrc.js +++ b/packages/react/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,tsx,js}': 'eslint', + '*.{ts,tsx,js,mjs}': 'eslint', }; diff --git a/packages/react/package.json b/packages/react/package.json index 507c94d7890..9a32cff7aaf 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -47,7 +47,7 @@ "check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui-react\"'", "clean": "rimraf dist node_modules", "dev": "yarn build:rollup --watch", - "lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx", + "lint": "yarn typecheck && eslint .", "prebuild": "rimraf dist", "size": "yarn size-limit", "test": "jest", diff --git a/packages/react/rollup.config.ts b/packages/react/rollup.config.mjs similarity index 74% rename from packages/react/rollup.config.ts rename to packages/react/rollup.config.mjs index e37aacaf780..f2692c34030 100644 --- a/packages/react/rollup.config.ts +++ b/packages/react/rollup.config.mjs @@ -1,6 +1,5 @@ import { defineConfig } from 'rollup'; import typescript from '@rollup/plugin-typescript'; - import externals from 'rollup-plugin-node-externals'; // common config settings @@ -8,14 +7,24 @@ const input = ['src/index.ts', 'src/internal.ts', 'src/server.ts']; const sourceMap = false; const tsconfig = 'tsconfig.dist.json'; +const esmOutputDir = 'dist/esm'; + +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { - dir: 'dist', - format: 'cjs', - }, + output: cjsOutput, plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), @@ -25,7 +34,7 @@ const config = defineConfig([ { input, output: { - dir: 'dist/esm', + dir: esmOutputDir, format: 'es', entryFileNames: '[name].mjs', preserveModules: true, @@ -34,7 +43,7 @@ const config = defineConfig([ plugins: [ externals({ include: /^@aws-amplify/ }), typescript({ - outDir: 'dist/esm', + outDir: esmOutputDir, declaration: false, sourceMap, tsconfig, diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index 9f18428fa54..411e2b8533d 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -3,12 +3,6 @@ "compilerOptions": { "noImplicitAny": false }, - "include": [ - "jest.config.ts", - "jest.setup.ts", - "scripts", - "src/**/*.ts", - "src/**/*.tsx" - ], - "exclude": ["node_modules", "rollup.config.ts"] + "include": ["*.ts", "*.mjs", "scripts", "src/**/*.ts", "src/**/*.tsx"], + "exclude": ["node_modules"] } diff --git a/packages/ui/.eslintrc.js b/packages/ui/.eslintrc.js index e1031bb187e..e913ce94581 100644 --- a/packages/ui/.eslintrc.js +++ b/packages/ui/.eslintrc.js @@ -1,27 +1,37 @@ module.exports = { - root: true, - env: { - node: true, - }, + env: { node: true }, + plugins: ['@typescript-eslint', 'import'], extends: ['eslint:recommended'], - ignorePatterns: ['dist'], + ignorePatterns: [ + '.eslintrc.js', + 'coverage', + 'dist', + 'node_modules', + '__tests__', + ], parser: '@typescript-eslint/parser', parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 12, sourceType: 'module', - allowImportExportEverywhere: true, + project: ['tsconfig.json'], + tsconfigRootDir: __dirname, }, - plugins: ['import'], rules: { - 'import/no-extraneous-dependencies': [ + 'no-console': 'error', + 'no-debugger': 'error', + // prefer `typescript-eslint` rule + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ 'error', { - packageDir: ['.', '../..'], + argsIgnorePattern: '_', + varsIgnorePattern: '_', + ignoreRestSiblings: true, }, ], - 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', - 'no-undef': 'off', - 'no-unused-vars': 'off', // prefer @typescript-eslint version + 'import/no-extraneous-dependencies': [ + 'error', + { packageDir: ['.', '../..'] }, + ], }, }; diff --git a/packages/ui/.lintstagedrc.js b/packages/ui/.lintstagedrc.js index 3470dfad4a3..6bc5a26318b 100644 --- a/packages/ui/.lintstagedrc.js +++ b/packages/ui/.lintstagedrc.js @@ -2,5 +2,5 @@ const config = require('../../.lintstagedrc.js'); module.exports = { ...config, - '*.{ts,js}': 'eslint', + '*.{ts,js,mjs}': 'eslint', }; diff --git a/packages/ui/rollup.config.ts b/packages/ui/rollup.config.mjs similarity index 80% rename from packages/ui/rollup.config.ts rename to packages/ui/rollup.config.mjs index de2a85441ca..f6bdd943db8 100644 --- a/packages/ui/rollup.config.ts +++ b/packages/ui/rollup.config.mjs @@ -9,11 +9,22 @@ const tsconfig = 'tsconfig.dist.json'; const esmOutputDir = 'dist/esm'; +/** + * @type {import('rollup').OutputOptions} + */ +const cjsOutput = { + dir: 'dist', + esModule: true, + format: 'cjs', + generatedCode: { reservedNamesAsProps: false }, + interop: 'auto', +}; + const config = defineConfig([ // CJS config { input, - output: { dir: 'dist', format: 'cjs' }, + output: cjsOutput, plugins: [ externals(), typescript({ declarationDir: 'dist/types', sourceMap, tsconfig }), diff --git a/packages/ui/src/helpers/authenticator/formFields/defaults.ts b/packages/ui/src/helpers/authenticator/formFields/defaults.ts index 702f3bc6a38..7e52f5ca3ff 100644 --- a/packages/ui/src/helpers/authenticator/formFields/defaults.ts +++ b/packages/ui/src/helpers/authenticator/formFields/defaults.ts @@ -45,9 +45,7 @@ export const getAliasDefaultFormField = ( }; /** Reusable confirmation code form fields. */ -const getConfirmationCodeFormFields = ( - state: AuthMachineState -): FormFields => ({ +const getConfirmationCodeFormFields = (_: AuthMachineState): FormFields => ({ confirmation_code: { ...getDefaultFormField('confirmation_code'), label: 'Code *', @@ -94,6 +92,7 @@ const getSignUpFormFields = (state: AuthMachineState): FormFields => { formField[fieldName] = { ...fieldAttrs }; } else { // There's a `custom:*` attribute or one we don't already have an implementation for + // eslint-disable-next-line no-console console.debug( `Authenticator does not have a default implementation for ${fieldName}. Customize SignUp FormFields to add your own.` ); @@ -102,7 +101,7 @@ const getSignUpFormFields = (state: AuthMachineState): FormFields => { return formField; }; -const getConfirmSignUpFormFields = (state: AuthMachineState): FormFields => ({ +const getConfirmSignUpFormFields = (_: AuthMachineState): FormFields => ({ confirmation_code: { ...getDefaultFormField('confirmation_code'), placeholder: 'Enter your code', @@ -158,6 +157,7 @@ const getForceNewPasswordFormFields = (state: AuthMachineState): FormFields => { formField[fieldName] = { ...getDefaultFormField(fieldName) }; } else { // There's a `custom:*` attribute or one we don't already have an implementation for + // eslint-disable-next-line no-console console.debug( `Authenticator does not have a default implementation for ${fieldName}. Customize ForceNewPassword FormFields to add your own.` ); diff --git a/packages/ui/src/machines/authenticator/defaultServices.ts b/packages/ui/src/machines/authenticator/defaultServices.ts index 440c88d0d90..c7a3cb02940 100644 --- a/packages/ui/src/machines/authenticator/defaultServices.ts +++ b/packages/ui/src/machines/authenticator/defaultServices.ts @@ -92,8 +92,8 @@ export const defaultServices = { // Validation hooks for overriding async validateCustomSignUp( - formData: AuthFormData, - touchData: AuthTouchData + _: AuthFormData, + __: AuthTouchData ): Promise {}, async validateFormPassword( formData: AuthFormData, @@ -169,7 +169,7 @@ export const defaultServices = { } }, async validatePreferredUsername( - formData: AuthFormData, - touchData: AuthTouchData + _: AuthFormData, + __: AuthTouchData ): Promise {}, }; diff --git a/packages/ui/src/theme/components/buttonGroup.ts b/packages/ui/src/theme/components/buttonGroup.ts index 705ec45f0b8..781aeb2abe1 100644 --- a/packages/ui/src/theme/components/buttonGroup.ts +++ b/packages/ui/src/theme/components/buttonGroup.ts @@ -1,4 +1,3 @@ import { ComponentStyles } from './utils'; -export type ButtonGroupTheme = - ComponentStyles; +export interface ButtonGroupTheme extends ComponentStyles {} diff --git a/packages/ui/src/theme/components/checkboxField.ts b/packages/ui/src/theme/components/checkboxField.ts index 935697c19fb..d165124bcf3 100644 --- a/packages/ui/src/theme/components/checkboxField.ts +++ b/packages/ui/src/theme/components/checkboxField.ts @@ -1,4 +1,3 @@ import { ComponentStyles } from './utils'; -export type CheckboxFieldTheme = - ComponentStyles; +export interface CheckboxFieldTheme extends ComponentStyles {} diff --git a/packages/ui/src/theme/components/selectField.ts b/packages/ui/src/theme/components/selectField.ts index a10ee35ee37..62d816e625a 100644 --- a/packages/ui/src/theme/components/selectField.ts +++ b/packages/ui/src/theme/components/selectField.ts @@ -1,4 +1,3 @@ import { ComponentStyles } from './utils'; -export type SelectFieldTheme = - ComponentStyles; +export interface SelectFieldTheme extends ComponentStyles {} diff --git a/packages/ui/src/theme/createTheme/createComponentCSS.ts b/packages/ui/src/theme/createTheme/createComponentCSS.ts index 65234c195a7..5d7a8786f6e 100644 --- a/packages/ui/src/theme/createTheme/createComponentCSS.ts +++ b/packages/ui/src/theme/createTheme/createComponentCSS.ts @@ -1,4 +1,4 @@ -import { DefaultTheme, WebTheme } from '../types'; +import { WebTheme } from '../types'; import { propsToString } from './utils'; import { ComponentsTheme } from '../components'; import { isFunction, splitObject } from '../../utils'; diff --git a/packages/ui/tsconfig.dist.json b/packages/ui/tsconfig.dist.json index 2f3b38f80cd..c4f013a9faf 100644 --- a/packages/ui/tsconfig.dist.json +++ b/packages/ui/tsconfig.dist.json @@ -1,4 +1,5 @@ { "extends": "./tsconfig.json", + "include": ["src/**/*.ts"], "exclude": ["node_modules", "**/__mocks__", "**/__tests__"] } diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index d62895c18ca..065e4a10c5e 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -3,6 +3,6 @@ "compilerOptions": { "strict": false }, - "include": ["src/**/*.ts", "src/**/*.tsx"], + "include": ["*.mjs", "*.ts", "scripts", "src/**/*.ts"], "exclude": ["node_modules"] } diff --git a/yarn.lock b/yarn.lock index 088aa9baf61..186ef3784e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7179,6 +7179,11 @@ resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== +"@jridgewell/sourcemap-codec@^1.5.0": + version "1.5.0" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== + "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -8162,18 +8167,18 @@ resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.5.0.tgz#57618e57942a5f0131374a9fdb0167e25a117fdc" integrity sha512-bkUDCp8o1MvFO+qxkODcbhSqRa6P2GXgrGZVpt0dCXNW2HCSCqYI0ZoAqEOSAjRWmmlKcYgFvN4B4S+zo/f8kg== -"@rollup/plugin-commonjs@^22.0.1": - version "22.0.2" - resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz#ee8ca8415cda30d383b4096aad5222435b4b69b6" - integrity sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg== +"@rollup/plugin-commonjs@^28.0.0": + version "28.0.0" + resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.0.tgz#44b5e49cb5d5e6233f1e4996013a8649fdbb9557" + integrity sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg== dependencies: - "@rollup/pluginutils" "^3.1.0" + "@rollup/pluginutils" "^5.0.1" commondir "^1.0.1" - estree-walker "^2.0.1" - glob "^7.1.6" - is-reference "^1.2.1" - magic-string "^0.25.7" - resolve "^1.17.0" + estree-walker "^2.0.2" + fdir "^6.1.1" + is-reference "1.2.1" + magic-string "^0.30.3" + picomatch "^2.3.1" "@rollup/plugin-dynamic-import-vars@^1.4.0": version "1.4.4" @@ -8204,12 +8209,12 @@ is-module "^1.0.0" resolve "^1.19.0" -"@rollup/plugin-typescript@^11.1.4": - version "11.1.5" - resolved "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.5.tgz#039c763bf943a5921f3f42be255895e75764cb91" - integrity sha512-rnMHrGBB0IUEv69Q8/JGRD/n4/n6b3nfpufUu26axhUcboUzv/twfZU8fIBbTOphRAe0v8EyxzeDpKXqGHfyDA== +"@rollup/plugin-typescript@^12.1.0": + version "12.1.0" + resolved "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.0.tgz#2b357972091d1a8f71b8c9ce5a6e95fe1473bf77" + integrity sha512-Kzs8KGJofe7cfTRODsnG1jNGxSvU8gVoNNd7Z/QaY25AYwe2LSSUpx/kPxqF38NYkpR8de3m51r9uwJpDlz6dg== dependencies: - "@rollup/pluginutils" "^5.0.1" + "@rollup/pluginutils" "^5.1.0" resolve "^1.22.1" "@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.0.9", "@rollup/pluginutils@^3.1.0": @@ -8247,80 +8252,94 @@ estree-walker "^2.0.2" picomatch "^2.3.1" -"@rollup/rollup-android-arm-eabi@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.14.0.tgz#57936f50d0335e2e7bfac496d209606fa516add4" - integrity sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w== - -"@rollup/rollup-android-arm64@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.14.0.tgz#81bba83b37382a2d0e30ceced06c8d3d85138054" - integrity sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q== - -"@rollup/rollup-darwin-arm64@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.14.0.tgz#a371bd723a5c4c4a33376da72abfc3938066842b" - integrity sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA== - -"@rollup/rollup-darwin-x64@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.14.0.tgz#8baf2fda277c9729125017c65651296282412886" - integrity sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ== - -"@rollup/rollup-linux-arm-gnueabihf@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.14.0.tgz#822830a8f7388d5b81d04c69415408d3bab1079b" - integrity sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA== - -"@rollup/rollup-linux-arm64-gnu@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.14.0.tgz#e20fbe1bd4414c7119f9e0bba8ad17a6666c8365" - integrity sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A== - -"@rollup/rollup-linux-arm64-musl@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.14.0.tgz#13f475596a62e1924f13fe1c8cf2c40e09a99b47" - integrity sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA== - -"@rollup/rollup-linux-powerpc64le-gnu@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.14.0.tgz#6a431c441420d1c510a205e08c6673355a0a2ea9" - integrity sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA== - -"@rollup/rollup-linux-riscv64-gnu@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.14.0.tgz#53d9448962c3f9ed7a1672269655476ea2d67567" - integrity sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw== - -"@rollup/rollup-linux-s390x-gnu@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.14.0.tgz#95f0c133b324da3e7e5c7d12855e0eb71d21a946" - integrity sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA== - -"@rollup/rollup-linux-x64-gnu@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.14.0.tgz#820ada75c68ead1acc486e41238ca0d8f8531478" - integrity sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg== - -"@rollup/rollup-linux-x64-musl@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.14.0.tgz#ca74f22e125efbe94c1148d989ef93329b464443" - integrity sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg== - -"@rollup/rollup-win32-arm64-msvc@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.14.0.tgz#269023332297051d037a9593dcba92c10fef726b" - integrity sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ== - -"@rollup/rollup-win32-ia32-msvc@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.14.0.tgz#d7701438daf964011fd7ca33e3f13f3ff5129e7b" - integrity sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw== - -"@rollup/rollup-win32-x64-msvc@4.14.0": - version "4.14.0" - resolved "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.14.0.tgz#0bb7ac3cd1c3292db1f39afdabfd03ccea3a3d34" - integrity sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag== +"@rollup/pluginutils@^5.1.0": + version "5.1.2" + resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.2.tgz#d3bc9f0fea4fd4086aaac6aa102f3fa587ce8bd9" + integrity sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + +"@rollup/rollup-android-arm-eabi@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz#8b613b9725e8f9479d142970b106b6ae878610d5" + integrity sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w== + +"@rollup/rollup-android-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz#654ca1049189132ff602bfcf8df14c18da1f15fb" + integrity sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA== + +"@rollup/rollup-darwin-arm64@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz#6d241d099d1518ef0c2205d96b3fa52e0fe1954b" + integrity sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q== + +"@rollup/rollup-darwin-x64@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz#42bd19d292a57ee11734c980c4650de26b457791" + integrity sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw== + +"@rollup/rollup-linux-arm-gnueabihf@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz#f23555ee3d8fe941c5c5fd458cd22b65eb1c2232" + integrity sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ== + +"@rollup/rollup-linux-arm-musleabihf@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz#f3bbd1ae2420f5539d40ac1fde2b38da67779baa" + integrity sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg== + +"@rollup/rollup-linux-arm64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz#7abe900120113e08a1f90afb84c7c28774054d15" + integrity sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw== + +"@rollup/rollup-linux-arm64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz#9e655285c8175cd44f57d6a1e8e5dedfbba1d820" + integrity sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz#9a79ae6c9e9d8fe83d49e2712ecf4302db5bef5e" + integrity sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg== + +"@rollup/rollup-linux-riscv64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz#67ac70eca4ace8e2942fabca95164e8874ab8128" + integrity sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA== + +"@rollup/rollup-linux-s390x-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz#9f883a7440f51a22ed7f99e1d070bd84ea5005fc" + integrity sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q== + +"@rollup/rollup-linux-x64-gnu@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz#70116ae6c577fe367f58559e2cffb5641a1dd9d0" + integrity sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg== + +"@rollup/rollup-linux-x64-musl@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz#f473f88219feb07b0b98b53a7923be716d1d182f" + integrity sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g== + +"@rollup/rollup-win32-arm64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz#4349482d17f5d1c58604d1c8900540d676f420e0" + integrity sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw== + +"@rollup/rollup-win32-ia32-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz#a6fc39a15db618040ec3c2a24c1e26cb5f4d7422" + integrity sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g== + +"@rollup/rollup-win32-x64-msvc@4.22.4": + version "4.22.4" + resolved "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" + integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== "@rushstack/eslint-patch@^1.3.3", "@rushstack/eslint-patch@^1.5.1": version "1.5.1" @@ -16726,7 +16745,7 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" -fdir@^6.3.0: +fdir@^6.1.1, fdir@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz#fcca5a23ea20e767b15e081ee13b3e6488ee0bb0" integrity sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ== @@ -18459,7 +18478,7 @@ is-potential-custom-element-name@^1.0.1: resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== -is-reference@^1.2.1: +is-reference@1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== @@ -20040,6 +20059,13 @@ magic-string@^0.30.0: dependencies: "@jridgewell/sourcemap-codec" "^1.4.13" +magic-string@^0.30.3: + version "0.30.11" + resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.11.tgz#301a6f93b3e8c2cb13ac1a7a673492c0dfd12954" + integrity sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + magic-string@^0.30.7: version "0.30.8" resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz#14e8624246d2bedba70d5462aa99ac9681844613" @@ -24721,7 +24747,7 @@ resolve@1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^1.1.7, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4, resolve@^1.3.2: +resolve@^1.1.7, resolve@^1.10.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.21.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4, resolve@^1.3.2: version "1.22.8" resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -24793,12 +24819,10 @@ rimraf@~2.6.2: dependencies: glob "^7.1.3" -rollup-plugin-node-externals@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/rollup-plugin-node-externals/-/rollup-plugin-node-externals-4.1.1.tgz#81d90eea6f99831a90206df1f0531fdcfc360d7c" - integrity sha512-hiGCMTKHVoueaTmtcUv1KR0/dlNBuI9GYzHUlSHQbMd7T7yomYdXCFnBisoBqdZYy61EGAIfz8AvJaWWBho3Pg== - dependencies: - find-up "^5.0.0" +rollup-plugin-node-externals@^7.1.3: + version "7.1.3" + resolved "https://registry.npmjs.org/rollup-plugin-node-externals/-/rollup-plugin-node-externals-7.1.3.tgz#7352584de22176422978ed9e2707984549c10c78" + integrity sha512-RM+7tJAejAoRsCf93TptTSdqUhRA8S78DleihMiu54Kac+uLkd9VIegLPhGnaW3ehZTXh56+R301mFH6j2A7vw== rollup-plugin-sourcemaps@^0.6.3: version "0.6.3" @@ -24844,35 +24868,29 @@ rollup-plugin-typescript2@^0.31.2: resolve "^1.20.0" tslib "^2.3.1" -rollup@^2.70.0: - version "2.79.1" - resolved "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" - integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== - optionalDependencies: - fsevents "~2.3.2" - -rollup@^4.13.0: - version "4.14.0" - resolved "https://registry.npmjs.org/rollup/-/rollup-4.14.0.tgz#c3e2cd479f1b2358b65c1f810fa05b51603d7be8" - integrity sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ== +rollup@^2.70.0, rollup@^4.13.0, rollup@^4.22.4: + version "4.22.4" + resolved "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f" + integrity sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A== dependencies: "@types/estree" "1.0.5" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.14.0" - "@rollup/rollup-android-arm64" "4.14.0" - "@rollup/rollup-darwin-arm64" "4.14.0" - "@rollup/rollup-darwin-x64" "4.14.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.14.0" - "@rollup/rollup-linux-arm64-gnu" "4.14.0" - "@rollup/rollup-linux-arm64-musl" "4.14.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.14.0" - "@rollup/rollup-linux-riscv64-gnu" "4.14.0" - "@rollup/rollup-linux-s390x-gnu" "4.14.0" - "@rollup/rollup-linux-x64-gnu" "4.14.0" - "@rollup/rollup-linux-x64-musl" "4.14.0" - "@rollup/rollup-win32-arm64-msvc" "4.14.0" - "@rollup/rollup-win32-ia32-msvc" "4.14.0" - "@rollup/rollup-win32-x64-msvc" "4.14.0" + "@rollup/rollup-android-arm-eabi" "4.22.4" + "@rollup/rollup-android-arm64" "4.22.4" + "@rollup/rollup-darwin-arm64" "4.22.4" + "@rollup/rollup-darwin-x64" "4.22.4" + "@rollup/rollup-linux-arm-gnueabihf" "4.22.4" + "@rollup/rollup-linux-arm-musleabihf" "4.22.4" + "@rollup/rollup-linux-arm64-gnu" "4.22.4" + "@rollup/rollup-linux-arm64-musl" "4.22.4" + "@rollup/rollup-linux-powerpc64le-gnu" "4.22.4" + "@rollup/rollup-linux-riscv64-gnu" "4.22.4" + "@rollup/rollup-linux-s390x-gnu" "4.22.4" + "@rollup/rollup-linux-x64-gnu" "4.22.4" + "@rollup/rollup-linux-x64-musl" "4.22.4" + "@rollup/rollup-win32-arm64-msvc" "4.22.4" + "@rollup/rollup-win32-ia32-msvc" "4.22.4" + "@rollup/rollup-win32-x64-msvc" "4.22.4" fsevents "~2.3.2" run-applescript@^5.0.0: