@elliemae/pui-cli 8.29.0 → 8.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/commands/utils.js +3 -1
- package/dist/cjs/monorepo/set-registry-version.js +3 -3
- package/dist/cjs/monorepo/set-workspace-version.js +3 -3
- package/dist/cjs/transpile/esbuild.js +3 -3
- package/dist/cjs/webpack/webpack.lib.dev.babel.js +3 -1
- package/dist/cjs/webpack/webpack.lib.prod.babel.js +3 -1
- package/dist/esm/commands/utils.js +3 -1
- package/dist/esm/monorepo/set-registry-version.js +3 -3
- package/dist/esm/monorepo/set-workspace-version.js +3 -3
- package/dist/esm/transpile/esbuild.js +3 -3
- package/dist/esm/webpack/webpack.lib.dev.babel.js +3 -1
- package/dist/esm/webpack/webpack.lib.prod.babel.js +3 -1
- package/package.json +20 -20
- package/dist/cjs/babel.config.cjs +0 -97
- package/dist/cjs/index.cjs +0 -23
- package/dist/cjs/jsdoc.conf.json +0 -17
- package/dist/cjs/lint-config/commitlint.config.cjs +0 -1
- package/dist/cjs/lint-config/eslint/common.cjs +0 -164
- package/dist/cjs/lint-config/eslint/non-react.cjs +0 -14
- package/dist/cjs/lint-config/eslint/react.cjs +0 -26
- package/dist/cjs/lint-config/eslint/typescript/common.cjs +0 -49
- package/dist/cjs/lint-config/eslint/typescript/non-react.cjs +0 -12
- package/dist/cjs/lint-config/eslint/typescript/react.cjs +0 -19
- package/dist/cjs/lint-config/prettier.config.cjs +0 -8
- package/dist/cjs/lint-config/stylelint.config.cjs +0 -20
- package/dist/cjs/monorepo/utils.cjs +0 -30
- package/dist/cjs/release.config.cjs +0 -24
- package/dist/cjs/testing/jest.config.cjs +0 -110
- package/dist/cjs/testing/jest.node.config.cjs +0 -8
- package/dist/cjs/testing/resolver.cjs +0 -47
- package/dist/cjs/transpile/.swcrc +0 -11
- package/dist/cjs/transpile/swcrc.config.cjs +0 -13
- package/dist/cjs/typedoc.cjs +0 -12
- package/dist/cjs/utils.cjs +0 -23
- package/dist/esm/babel.config.cjs +0 -97
- package/dist/esm/index.cjs +0 -23
- package/dist/esm/jsdoc.conf.json +0 -17
- package/dist/esm/lint-config/commitlint.config.cjs +0 -1
- package/dist/esm/lint-config/eslint/common.cjs +0 -164
- package/dist/esm/lint-config/eslint/non-react.cjs +0 -14
- package/dist/esm/lint-config/eslint/react.cjs +0 -26
- package/dist/esm/lint-config/eslint/typescript/common.cjs +0 -49
- package/dist/esm/lint-config/eslint/typescript/non-react.cjs +0 -12
- package/dist/esm/lint-config/eslint/typescript/react.cjs +0 -19
- package/dist/esm/lint-config/prettier.config.cjs +0 -8
- package/dist/esm/lint-config/stylelint.config.cjs +0 -20
- package/dist/esm/monorepo/utils.cjs +0 -30
- package/dist/esm/release.config.cjs +0 -24
- package/dist/esm/testing/jest.config.cjs +0 -110
- package/dist/esm/testing/jest.node.config.cjs +0 -8
- package/dist/esm/testing/resolver.cjs +0 -47
- package/dist/esm/transpile/.swcrc +0 -11
- package/dist/esm/transpile/swcrc.config.cjs +0 -13
- package/dist/esm/typedoc.cjs +0 -12
- package/dist/esm/utils.cjs +0 -23
|
@@ -154,7 +154,9 @@ const updateManifestWithVersionInfo = async (dest) => {
|
|
|
154
154
|
const updateRuntimeFile = async (src, dest, version) => {
|
|
155
155
|
const latestJSFolder = "latest/js";
|
|
156
156
|
const pipe = (0, import_node_util.promisify)(import_node_stream.pipeline);
|
|
157
|
-
const results = await (0, import_fast_glob.default)([
|
|
157
|
+
const results = await (0, import_fast_glob.default)([
|
|
158
|
+
import_fast_glob.default.convertPathToPattern(import_node_path.default.join(src, "runtime~app.*.js"))
|
|
159
|
+
]);
|
|
158
160
|
if (!results?.length)
|
|
159
161
|
throw new Error("Runtime file not found");
|
|
160
162
|
const runtimeFilePath = results[0];
|
|
@@ -38,9 +38,9 @@ var import_utils = require("./utils.js");
|
|
|
38
38
|
const monorepoRoot = (0, import_normalize_path.default)((0, import_utils.findMonoRepoRoot)() || "");
|
|
39
39
|
const setRegistryVersion = async () => {
|
|
40
40
|
const files = await (0, import_fast_glob.default)([
|
|
41
|
-
`${monorepoRoot}/libs/*/package.json
|
|
42
|
-
`${monorepoRoot}/apps/*/package.json
|
|
43
|
-
`${monorepoRoot}/package.json`
|
|
41
|
+
import_fast_glob.default.convertPathToPattern(`${monorepoRoot}/libs/*/package.json`),
|
|
42
|
+
import_fast_glob.default.convertPathToPattern(`${monorepoRoot}/apps/*/package.json`),
|
|
43
|
+
import_fast_glob.default.convertPathToPattern(`${monorepoRoot}/package.json`)
|
|
44
44
|
]);
|
|
45
45
|
await Promise.all(
|
|
46
46
|
files.map(async (file) => {
|
|
@@ -38,9 +38,9 @@ var import_utils = require("./utils.js");
|
|
|
38
38
|
const monorepoRoot = (0, import_normalize_path.default)((0, import_utils.findMonoRepoRoot)() || "");
|
|
39
39
|
const setWorkspaceVersion = async () => {
|
|
40
40
|
const files = await (0, import_fast_glob.default)([
|
|
41
|
-
`${monorepoRoot}/libs/*/package.json
|
|
42
|
-
`${monorepoRoot}/apps/*/package.json
|
|
43
|
-
`${monorepoRoot}/package.json`
|
|
41
|
+
import_fast_glob.default.convertPathToPattern(`${monorepoRoot}/libs/*/package.json`),
|
|
42
|
+
import_fast_glob.default.convertPathToPattern(`${monorepoRoot}/apps/*/package.json`),
|
|
43
|
+
import_fast_glob.default.convertPathToPattern(`${monorepoRoot}/package.json`)
|
|
44
44
|
]);
|
|
45
45
|
await Promise.all(
|
|
46
46
|
files.map(async (file) => {
|
|
@@ -63,9 +63,9 @@ const getCommonConfig = ({ injectReactShim }) => ({
|
|
|
63
63
|
});
|
|
64
64
|
const copyFiles = async ({ srcdir, outdir }) => {
|
|
65
65
|
const files = await (0, import_fast_glob.default)([
|
|
66
|
-
`${srcdir}
|
|
67
|
-
`${srcdir}/**/.swcrc
|
|
68
|
-
`!${srcdir}/**/*.{js,jsx,ts,tsx,mjs}`
|
|
66
|
+
import_fast_glob.default.convertPathToPattern(`${srcdir}/**/*.*`),
|
|
67
|
+
import_fast_glob.default.convertPathToPattern(`${srcdir}/**/.swcrc`),
|
|
68
|
+
import_fast_glob.default.convertPathToPattern(`!${srcdir}/**/*.{js,jsx,ts,tsx,mjs}`)
|
|
69
69
|
]);
|
|
70
70
|
await Promise.all(
|
|
71
71
|
files.map(async (srcFilePath) => {
|
|
@@ -42,7 +42,9 @@ var import_helpers = require("./helpers.js");
|
|
|
42
42
|
var import_webpack_lib_base_babel = require("./webpack.lib.base.babel.js");
|
|
43
43
|
const { basePath } = (0, import_helpers.getPaths)();
|
|
44
44
|
const getHtmlWebpackPlugins = () => {
|
|
45
|
-
const htmlTemplateFiles = import_fast_glob.default.sync([
|
|
45
|
+
const htmlTemplateFiles = import_fast_glob.default.sync([
|
|
46
|
+
import_fast_glob.default.convertPathToPattern(import_node_path.default.join(process.cwd(), "lib/*.html"))
|
|
47
|
+
]);
|
|
46
48
|
return htmlTemplateFiles.map(
|
|
47
49
|
(htmlTemplateFile) => new import_html_webpack_plugin.default({
|
|
48
50
|
template: htmlTemplateFile,
|
|
@@ -41,7 +41,9 @@ var import_browserslist_to_esbuild = __toESM(require("browserslist-to-esbuild"),
|
|
|
41
41
|
var import_helpers = require("./helpers.js");
|
|
42
42
|
var import_webpack_lib_base_babel = require("./webpack.lib.base.babel.js");
|
|
43
43
|
const getHtmlWebpackPlugins = () => {
|
|
44
|
-
const htmlTemplateFiles = import_fast_glob.default.sync([
|
|
44
|
+
const htmlTemplateFiles = import_fast_glob.default.sync([
|
|
45
|
+
import_fast_glob.default.convertPathToPattern(import_node_path.default.join(process.cwd(), "lib/*.html"))
|
|
46
|
+
]);
|
|
45
47
|
return htmlTemplateFiles.map(
|
|
46
48
|
(htmlTemplateFile) => new import_html_webpack_plugin.default({
|
|
47
49
|
template: htmlTemplateFile,
|
|
@@ -123,7 +123,9 @@ const updateManifestWithVersionInfo = async (dest) => {
|
|
|
123
123
|
const updateRuntimeFile = async (src, dest, version) => {
|
|
124
124
|
const latestJSFolder = "latest/js";
|
|
125
125
|
const pipe = promisify(pipeline);
|
|
126
|
-
const results = await fg([
|
|
126
|
+
const results = await fg([
|
|
127
|
+
fg.convertPathToPattern(path.join(src, "runtime~app.*.js"))
|
|
128
|
+
]);
|
|
127
129
|
if (!results?.length)
|
|
128
130
|
throw new Error("Runtime file not found");
|
|
129
131
|
const runtimeFilePath = results[0];
|
|
@@ -5,9 +5,9 @@ import { findMonoRepoRoot } from "./utils.js";
|
|
|
5
5
|
const monorepoRoot = normalizePath(findMonoRepoRoot() || "");
|
|
6
6
|
const setRegistryVersion = async () => {
|
|
7
7
|
const files = await fg([
|
|
8
|
-
`${monorepoRoot}/libs/*/package.json
|
|
9
|
-
`${monorepoRoot}/apps/*/package.json
|
|
10
|
-
`${monorepoRoot}/package.json`
|
|
8
|
+
fg.convertPathToPattern(`${monorepoRoot}/libs/*/package.json`),
|
|
9
|
+
fg.convertPathToPattern(`${monorepoRoot}/apps/*/package.json`),
|
|
10
|
+
fg.convertPathToPattern(`${monorepoRoot}/package.json`)
|
|
11
11
|
]);
|
|
12
12
|
await Promise.all(
|
|
13
13
|
files.map(async (file) => {
|
|
@@ -5,9 +5,9 @@ import { findMonoRepoRoot } from "./utils.js";
|
|
|
5
5
|
const monorepoRoot = normalizePath(findMonoRepoRoot() || "");
|
|
6
6
|
const setWorkspaceVersion = async () => {
|
|
7
7
|
const files = await fg([
|
|
8
|
-
`${monorepoRoot}/libs/*/package.json
|
|
9
|
-
`${monorepoRoot}/apps/*/package.json
|
|
10
|
-
`${monorepoRoot}/package.json`
|
|
8
|
+
fg.convertPathToPattern(`${monorepoRoot}/libs/*/package.json`),
|
|
9
|
+
fg.convertPathToPattern(`${monorepoRoot}/apps/*/package.json`),
|
|
10
|
+
fg.convertPathToPattern(`${monorepoRoot}/package.json`)
|
|
11
11
|
]);
|
|
12
12
|
await Promise.all(
|
|
13
13
|
files.map(async (file) => {
|
|
@@ -28,9 +28,9 @@ const getCommonConfig = ({ injectReactShim }) => ({
|
|
|
28
28
|
});
|
|
29
29
|
const copyFiles = async ({ srcdir, outdir }) => {
|
|
30
30
|
const files = await fg([
|
|
31
|
-
`${srcdir}
|
|
32
|
-
`${srcdir}/**/.swcrc
|
|
33
|
-
`!${srcdir}/**/*.{js,jsx,ts,tsx,mjs}`
|
|
31
|
+
fg.convertPathToPattern(`${srcdir}/**/*.*`),
|
|
32
|
+
fg.convertPathToPattern(`${srcdir}/**/.swcrc`),
|
|
33
|
+
fg.convertPathToPattern(`!${srcdir}/**/*.{js,jsx,ts,tsx,mjs}`)
|
|
34
34
|
]);
|
|
35
35
|
await Promise.all(
|
|
36
36
|
files.map(async (srcFilePath) => {
|
|
@@ -9,7 +9,9 @@ import { getPaths } from "./helpers.js";
|
|
|
9
9
|
import { baseConfig } from "./webpack.lib.base.babel.js";
|
|
10
10
|
const { basePath } = getPaths();
|
|
11
11
|
const getHtmlWebpackPlugins = () => {
|
|
12
|
-
const htmlTemplateFiles = fg.sync([
|
|
12
|
+
const htmlTemplateFiles = fg.sync([
|
|
13
|
+
fg.convertPathToPattern(path.join(process.cwd(), "lib/*.html"))
|
|
14
|
+
]);
|
|
13
15
|
return htmlTemplateFiles.map(
|
|
14
16
|
(htmlTemplateFile) => new HtmlWebpackPlugin({
|
|
15
17
|
template: htmlTemplateFile,
|
|
@@ -8,7 +8,9 @@ import browserslistToEsbuild from "browserslist-to-esbuild";
|
|
|
8
8
|
import { getCompressionPlugins, getLibraryName } from "./helpers.js";
|
|
9
9
|
import { baseConfig } from "./webpack.lib.base.babel.js";
|
|
10
10
|
const getHtmlWebpackPlugins = () => {
|
|
11
|
-
const htmlTemplateFiles = fg.sync([
|
|
11
|
+
const htmlTemplateFiles = fg.sync([
|
|
12
|
+
fg.convertPathToPattern(path.join(process.cwd(), "lib/*.html"))
|
|
13
|
+
]);
|
|
12
14
|
return htmlTemplateFiles.map(
|
|
13
15
|
(htmlTemplateFile) => new HtmlWebpackPlugin({
|
|
14
16
|
template: htmlTemplateFile,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/pui-cli",
|
|
3
|
-
"version": "8.29.
|
|
3
|
+
"version": "8.29.1",
|
|
4
4
|
"description": "ICE MT UI Platform CLI",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "./dist/cjs/index.cjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"sonar56x": true
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@axe-core/react": "~4.8.
|
|
77
|
+
"@axe-core/react": "~4.8.3",
|
|
78
78
|
"@babel/cli": "~7.23.4",
|
|
79
79
|
"@babel/core": "~7.23.7",
|
|
80
80
|
"@babel/eslint-parser": "~7.23.3",
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"@babel/plugin-transform-react-inline-elements": "~7.23.3",
|
|
89
89
|
"@babel/plugin-transform-react-jsx-source": "~7.23.3",
|
|
90
90
|
"@babel/plugin-transform-runtime": "~7.23.7",
|
|
91
|
-
"@babel/preset-env": "~7.23.
|
|
91
|
+
"@babel/preset-env": "~7.23.8",
|
|
92
92
|
"@babel/preset-react": "~7.23.3",
|
|
93
93
|
"@babel/preset-typescript": "~7.23.3",
|
|
94
|
-
"@babel/runtime": "~7.23.
|
|
94
|
+
"@babel/runtime": "~7.23.8",
|
|
95
95
|
"@commitlint/cli": "~17.8.1",
|
|
96
96
|
"@commitlint/config-conventional": "~17.8.1",
|
|
97
97
|
"@elliemae/browserslist-config-elliemae-latest-browsers": "~1.8.0",
|
|
@@ -116,9 +116,9 @@
|
|
|
116
116
|
"@storybook/theming": "~6.5.16",
|
|
117
117
|
"@stylelint/postcss-css-in-js": "~0.38.0",
|
|
118
118
|
"@svgr/webpack": "~7.0.0",
|
|
119
|
-
"@swc/cli": "~0.1.
|
|
120
|
-
"@swc/core": "~1.3.
|
|
121
|
-
"@swc/jest": "~0.2.
|
|
119
|
+
"@swc/cli": "~0.1.65",
|
|
120
|
+
"@swc/core": "~1.3.105",
|
|
121
|
+
"@swc/jest": "~0.2.31",
|
|
122
122
|
"@testing-library/jest-dom": "~5.17.0",
|
|
123
123
|
"@testing-library/react": "~14.1.2",
|
|
124
124
|
"@testing-library/react-hooks": "~8.0.1",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"@types/jest": "~29.5.11",
|
|
132
132
|
"@types/jest-axe": "~3.5.9",
|
|
133
133
|
"@types/moment-locales-webpack-plugin": "~1.2.6",
|
|
134
|
-
"@types/node": "~18.19.
|
|
134
|
+
"@types/node": "~18.19.8",
|
|
135
135
|
"@types/normalize-path": "~3.0.2",
|
|
136
136
|
"@types/postcss-preset-env": "~7.7.0",
|
|
137
137
|
"@types/rimraf": "~3.0.2",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"@vitejs/plugin-react": "~4.2.1",
|
|
146
146
|
"@vitest/coverage-c8": "~0.33.0",
|
|
147
147
|
"@vitest/coverage-v8": "~0.34.6",
|
|
148
|
-
"autoprefixer": "~10.4.
|
|
148
|
+
"autoprefixer": "~10.4.17",
|
|
149
149
|
"axe-core": "~4.8.3",
|
|
150
150
|
"babel-plugin-date-fns": "~2.0.0",
|
|
151
151
|
"babel-plugin-dynamic-import-node": "~2.3.3",
|
|
@@ -167,11 +167,11 @@
|
|
|
167
167
|
"copy-webpack-plugin": "~11.0.0",
|
|
168
168
|
"cors": "~2.8.5",
|
|
169
169
|
"cross-env": "~7.0.3",
|
|
170
|
-
"css-loader": "~6.
|
|
170
|
+
"css-loader": "~6.9.1",
|
|
171
171
|
"css-minimizer-webpack-plugin": "~5.0.1",
|
|
172
172
|
"depcheck": "~1.4.7",
|
|
173
173
|
"docdash": "~2.0.2",
|
|
174
|
-
"dotenv": "~16.3.
|
|
174
|
+
"dotenv": "~16.3.2",
|
|
175
175
|
"dotenv-webpack": "~8.0.1",
|
|
176
176
|
"duplicate-package-checker-webpack-plugin": "~3.0.0",
|
|
177
177
|
"enhanced-resolve": "5.15.0",
|
|
@@ -190,10 +190,10 @@
|
|
|
190
190
|
"eslint-plugin-compat": "~4.2.0",
|
|
191
191
|
"eslint-plugin-eslint-comments": "~3.2.0",
|
|
192
192
|
"eslint-plugin-import": "~2.29.1",
|
|
193
|
-
"eslint-plugin-jest": "~27.6.
|
|
193
|
+
"eslint-plugin-jest": "~27.6.3",
|
|
194
194
|
"eslint-plugin-jsdoc": "~43.2.0",
|
|
195
195
|
"eslint-plugin-jsx-a11y": "~6.8.0",
|
|
196
|
-
"eslint-plugin-mdx": "~2.3.
|
|
196
|
+
"eslint-plugin-mdx": "~2.3.4",
|
|
197
197
|
"eslint-plugin-prettier": "~4.2.1",
|
|
198
198
|
"eslint-plugin-react": "~7.33.2",
|
|
199
199
|
"eslint-plugin-react-hooks": "~4.6.0",
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
"jsdoc": "~4.0.2",
|
|
229
229
|
"lerna": "~6.6.2",
|
|
230
230
|
"lint-staged": "~13.3.0",
|
|
231
|
-
"mini-css-extract-plugin": "~2.7.
|
|
231
|
+
"mini-css-extract-plugin": "~2.7.7",
|
|
232
232
|
"minimist": "~1.2.8",
|
|
233
233
|
"moment": "~2.30.1",
|
|
234
234
|
"moment-locales-webpack-plugin": "~1.2.0",
|
|
@@ -244,7 +244,7 @@
|
|
|
244
244
|
"pino-pretty": "~10.3.1",
|
|
245
245
|
"plop": "~3.1.2",
|
|
246
246
|
"postcss": "~8.4.33",
|
|
247
|
-
"postcss-html": "~1.
|
|
247
|
+
"postcss-html": "~1.6.0",
|
|
248
248
|
"postcss-jsx": "~0.36.4",
|
|
249
249
|
"postcss-loader": "~7.3.4",
|
|
250
250
|
"postcss-markdown": "~1.2.0",
|
|
@@ -266,23 +266,23 @@
|
|
|
266
266
|
"speed-measure-webpack-plugin": "~1.5.0",
|
|
267
267
|
"storybook-addon-turbo-build": "~1.1.0",
|
|
268
268
|
"storybook-react-router": "~1.0.8",
|
|
269
|
-
"style-loader": "~3.3.
|
|
269
|
+
"style-loader": "~3.3.4",
|
|
270
270
|
"stylelint": "~15.11.0",
|
|
271
271
|
"stylelint-config-recommended": "~12.0.0",
|
|
272
272
|
"stylelint-config-styled-components": "~0.1.1",
|
|
273
|
-
"supertest": "~6.3.
|
|
273
|
+
"supertest": "~6.3.4",
|
|
274
274
|
"swc-loader": "~0.2.3",
|
|
275
275
|
"tsconfig-paths-webpack-plugin": "~3.5.2",
|
|
276
276
|
"ts-node": "~10.9.2",
|
|
277
277
|
"tsc-alias": "~1.8.8",
|
|
278
278
|
"tsx": "~3.13.0",
|
|
279
|
-
"typedoc": "~0.25.
|
|
279
|
+
"typedoc": "~0.25.7",
|
|
280
280
|
"typescript": "~5.3.3",
|
|
281
281
|
"update-notifier": "~6.0.2",
|
|
282
282
|
"url-loader": "~4.1.1",
|
|
283
283
|
"uuid": "~9.0.1",
|
|
284
|
-
"vite": "~4.5.
|
|
285
|
-
"vite-tsconfig-paths": "~4.
|
|
284
|
+
"vite": "~4.5.2",
|
|
285
|
+
"vite-tsconfig-paths": "~4.3.1",
|
|
286
286
|
"vitest": "1.0.0-beta.3",
|
|
287
287
|
"webpack": "~5.89.0",
|
|
288
288
|
"webpack-bundle-analyzer": "~4.10.1",
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
const { isApp } = require('./utils.cjs');
|
|
2
|
-
|
|
3
|
-
const nodeEnvPreset = {
|
|
4
|
-
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
5
|
-
targets: {
|
|
6
|
-
node: 'current',
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const webEnvPreset = {
|
|
11
|
-
modules: process.env.ES_MODULES === 'false' ? 'commonjs' : false,
|
|
12
|
-
useBuiltIns: 'usage',
|
|
13
|
-
corejs: { version: '3.22', proposals: true },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const presetEnvOptions =
|
|
17
|
-
process.env.TARGET_ENV === 'node' ? nodeEnvPreset : webEnvPreset;
|
|
18
|
-
|
|
19
|
-
const config = {
|
|
20
|
-
ignore: [/\/core-js/],
|
|
21
|
-
sourceType: 'unambiguous',
|
|
22
|
-
presets: [
|
|
23
|
-
['@babel/preset-env', presetEnvOptions],
|
|
24
|
-
['@babel/preset-react', { runtime: 'automatic' }],
|
|
25
|
-
'@babel/preset-typescript',
|
|
26
|
-
],
|
|
27
|
-
plugins: [
|
|
28
|
-
[
|
|
29
|
-
'babel-plugin-module-resolver',
|
|
30
|
-
{
|
|
31
|
-
alias: {
|
|
32
|
-
'@': isApp() ? './app' : './lib',
|
|
33
|
-
},
|
|
34
|
-
stripExtensions: [],
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
['babel-plugin-styled-components', { displayName: true }],
|
|
38
|
-
['@babel/plugin-transform-runtime', { regenerator: true }],
|
|
39
|
-
'@babel/plugin-proposal-class-properties',
|
|
40
|
-
'@babel/plugin-syntax-dynamic-import',
|
|
41
|
-
'@babel/plugin-proposal-export-default-from',
|
|
42
|
-
'lodash',
|
|
43
|
-
'date-fns',
|
|
44
|
-
],
|
|
45
|
-
env: {
|
|
46
|
-
development: {
|
|
47
|
-
plugins: [
|
|
48
|
-
['babel-plugin-styled-components', { displayName: true }],
|
|
49
|
-
'@babel/plugin-transform-react-jsx-source',
|
|
50
|
-
],
|
|
51
|
-
},
|
|
52
|
-
production: {
|
|
53
|
-
plugins: [
|
|
54
|
-
['babel-plugin-styled-components', { displayName: false, pure: true }],
|
|
55
|
-
['transform-remove-console', { exclude: ['error', 'warn'] }],
|
|
56
|
-
'transform-react-remove-prop-types',
|
|
57
|
-
'@babel/plugin-transform-react-inline-elements',
|
|
58
|
-
'@babel/plugin-transform-react-constant-elements',
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
test: {
|
|
62
|
-
plugins: [
|
|
63
|
-
['babel-plugin-styled-components', { displayName: true }],
|
|
64
|
-
'@babel/plugin-transform-modules-commonjs',
|
|
65
|
-
'dynamic-import-node',
|
|
66
|
-
[
|
|
67
|
-
'babel-plugin-transform-strip-block',
|
|
68
|
-
{
|
|
69
|
-
requireDirective: true,
|
|
70
|
-
identifiers: [{ start: 'block:start', end: 'block:end' }],
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
'babel-plugin-import-remove-resource-query',
|
|
74
|
-
],
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
process.env.STORYBOOK_BUILD !== 'true' &&
|
|
81
|
-
process.env.TARGET_ENV !== 'node'
|
|
82
|
-
) {
|
|
83
|
-
config.env?.development?.plugins?.push?.('react-refresh/babel');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// ToDo: Once ECC team migrates from webpack 3 to webpack 5 remove this strip-block plugin from commonjs output. without this they are receiving error when import.meta is used in app sdk
|
|
87
|
-
if (process.env.ES_MODULES === 'false') {
|
|
88
|
-
config.plugins.push([
|
|
89
|
-
'babel-plugin-transform-strip-block',
|
|
90
|
-
{
|
|
91
|
-
requireDirective: true,
|
|
92
|
-
identifiers: [{ start: 'block:start', end: 'block:end' }],
|
|
93
|
-
},
|
|
94
|
-
]);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
exports.babelConfig = config;
|
package/dist/cjs/index.cjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
const { babelConfig } = require('./babel.config.cjs');
|
|
2
|
-
const {
|
|
3
|
-
esConfig: eslintBaseConfig,
|
|
4
|
-
} = require('./lint-config/eslint/non-react.cjs');
|
|
5
|
-
const {
|
|
6
|
-
esReactConfig: eslintConfig,
|
|
7
|
-
} = require('./lint-config/eslint/react.cjs');
|
|
8
|
-
const { stylelintConfig } = require('./lint-config/stylelint.config.cjs');
|
|
9
|
-
const { prettierConfig } = require('./lint-config/prettier.config.cjs');
|
|
10
|
-
const { commitlintConfig } = require('./lint-config/commitlint.config.cjs');
|
|
11
|
-
const { jestConfig } = require('./testing/jest.config.cjs');
|
|
12
|
-
const { jestNodeConfig } = require('./testing/jest.node.config.cjs');
|
|
13
|
-
|
|
14
|
-
module.exports = {
|
|
15
|
-
babelConfig,
|
|
16
|
-
eslintBaseConfig,
|
|
17
|
-
eslintConfig,
|
|
18
|
-
stylelintConfig,
|
|
19
|
-
prettierConfig,
|
|
20
|
-
commitlintConfig,
|
|
21
|
-
jestConfig,
|
|
22
|
-
jestNodeConfig,
|
|
23
|
-
};
|
package/dist/cjs/jsdoc.conf.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"plugins": ["plugins/markdown"],
|
|
3
|
-
"opts": {
|
|
4
|
-
"template": "node_modules/docdash"
|
|
5
|
-
},
|
|
6
|
-
"docdash": {
|
|
7
|
-
"sort": true,
|
|
8
|
-
"search": true,
|
|
9
|
-
"collapse": true,
|
|
10
|
-
"wrap": true
|
|
11
|
-
},
|
|
12
|
-
"templates": {
|
|
13
|
-
"default": {
|
|
14
|
-
"includeDate": false
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
exports.commitlintConfig = { extends: ['@commitlint/config-conventional'] };
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-lines */
|
|
2
|
-
const prettierOptions = require("../prettier.config.cjs");
|
|
3
|
-
// const webpackConfig = require('../../webpack/webpack.prod.babel');
|
|
4
|
-
|
|
5
|
-
exports.baseExtends = [
|
|
6
|
-
"plugin:eslint-comments/recommended",
|
|
7
|
-
"plugin:import/recommended",
|
|
8
|
-
"plugin:prettier/recommended",
|
|
9
|
-
"plugin:jest/recommended",
|
|
10
|
-
"plugin:jsdoc/recommended",
|
|
11
|
-
"plugin:wdio/recommended",
|
|
12
|
-
"plugin:testing-library/dom",
|
|
13
|
-
"plugin:storybook/recommended",
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
const basePlugins = ["testing-library", "jest", "jsdoc", "wdio", "import"];
|
|
17
|
-
exports.basePlugins = basePlugins;
|
|
18
|
-
|
|
19
|
-
exports.baseOverrides = [
|
|
20
|
-
{
|
|
21
|
-
files: ["*.func.spec.js", "*.visual.spec.js"],
|
|
22
|
-
rules: {
|
|
23
|
-
"jest/valid-expect": "off",
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
const baseRules = {
|
|
29
|
-
"prettier/prettier": ["error", prettierOptions],
|
|
30
|
-
"arrow-body-style": [2, "as-needed"],
|
|
31
|
-
"class-methods-use-this": 0,
|
|
32
|
-
"import/imports-first": 0,
|
|
33
|
-
"import/newline-after-import": 0,
|
|
34
|
-
"import/no-dynamic-require": 0,
|
|
35
|
-
"import/no-extraneous-dependencies": 0,
|
|
36
|
-
"import/no-named-as-default": 0,
|
|
37
|
-
"import/no-unresolved": [
|
|
38
|
-
2,
|
|
39
|
-
{ caseSensitive: true, caseSensitiveStrict: true },
|
|
40
|
-
], // Tip: https://github.com/import-js/eslint-plugin-import/issues/1868
|
|
41
|
-
"import/no-webpack-loader-syntax": 0,
|
|
42
|
-
"import/prefer-default-export": 0,
|
|
43
|
-
"import/extensions": [
|
|
44
|
-
2,
|
|
45
|
-
"never",
|
|
46
|
-
{
|
|
47
|
-
json: "ignorePackages",
|
|
48
|
-
js: "ignorePackages",
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
indent: [
|
|
52
|
-
2,
|
|
53
|
-
2,
|
|
54
|
-
{
|
|
55
|
-
SwitchCase: 1,
|
|
56
|
-
},
|
|
57
|
-
],
|
|
58
|
-
"max-lines": ["error", { max: 120, skipComments: true }],
|
|
59
|
-
complexity: ["error", { max: 10 }],
|
|
60
|
-
"max-depth": ["error", { max: 4 }],
|
|
61
|
-
"max-lines-per-function": 0,
|
|
62
|
-
"max-nested-callbacks": ["error", { max: 3 }],
|
|
63
|
-
"max-params": ["error", { max: 3 }],
|
|
64
|
-
"max-statements": ["error", { max: 20 }],
|
|
65
|
-
"max-len": 0,
|
|
66
|
-
"newline-per-chained-call": 0,
|
|
67
|
-
"no-confusing-arrow": 0,
|
|
68
|
-
"no-console": 1,
|
|
69
|
-
"no-param-reassign": ["error", { props: false }],
|
|
70
|
-
"no-unused-vars": 2,
|
|
71
|
-
"no-use-before-define": 0,
|
|
72
|
-
"prefer-template": 2,
|
|
73
|
-
"require-yield": 0,
|
|
74
|
-
"jsdoc/require-jsdoc": 0,
|
|
75
|
-
"eslint-comments/disable-enable-pair": 0,
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
exports.baseRules = baseRules;
|
|
79
|
-
|
|
80
|
-
const reactRules = {
|
|
81
|
-
"jsx-a11y/aria-props": 2,
|
|
82
|
-
"jsx-a11y/heading-has-content": 0,
|
|
83
|
-
"jsx-a11y/label-has-associated-control": [
|
|
84
|
-
2,
|
|
85
|
-
{
|
|
86
|
-
// NOTE: If this error triggers, either disable it or add
|
|
87
|
-
// your custom components, labels and attributes via these options
|
|
88
|
-
// See https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md
|
|
89
|
-
controlComponents: ["Input"],
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
"jsx-a11y/label-has-for": 0,
|
|
93
|
-
"jsx-a11y/mouse-events-have-key-events": 2,
|
|
94
|
-
"jsx-a11y/role-has-required-aria-props": 2,
|
|
95
|
-
"jsx-a11y/role-supports-aria-props": 2,
|
|
96
|
-
"react/destructuring-assignment": 0,
|
|
97
|
-
"react-hooks/rules-of-hooks": "error",
|
|
98
|
-
"react/jsx-closing-tag-location": 0,
|
|
99
|
-
"react/forbid-prop-types": 0,
|
|
100
|
-
"react/jsx-first-prop-new-line": [2, "multiline"],
|
|
101
|
-
"react/jsx-no-target-blank": 0,
|
|
102
|
-
"react/jsx-props-no-spreading": 0,
|
|
103
|
-
"react/jsx-uses-vars": 2,
|
|
104
|
-
"react/require-default-props": 0,
|
|
105
|
-
"react/require-extension": 0,
|
|
106
|
-
"react/self-closing-comp": 0,
|
|
107
|
-
"react/sort-comp": 0,
|
|
108
|
-
"react/react-in-jsx-scope": 0,
|
|
109
|
-
"react/jsx-filename-extension": [
|
|
110
|
-
1,
|
|
111
|
-
{ extensions: [".js", ".jsx", ".tsx", ".mdx"] },
|
|
112
|
-
],
|
|
113
|
-
"react/function-component-definition": [
|
|
114
|
-
2,
|
|
115
|
-
{ namedComponents: "arrow-function" },
|
|
116
|
-
],
|
|
117
|
-
"redux-saga/no-yield-in-race": 2,
|
|
118
|
-
"redux-saga/yield-effects": 2,
|
|
119
|
-
};
|
|
120
|
-
exports.reactRules = reactRules;
|
|
121
|
-
|
|
122
|
-
exports.baseConfig = {
|
|
123
|
-
parser: "@babel/eslint-parser",
|
|
124
|
-
plugins: basePlugins,
|
|
125
|
-
env: {
|
|
126
|
-
jest: true,
|
|
127
|
-
browser: true,
|
|
128
|
-
node: true,
|
|
129
|
-
es2021: true,
|
|
130
|
-
},
|
|
131
|
-
parserOptions: {
|
|
132
|
-
sourceType: "module",
|
|
133
|
-
ecmaFeatures: {
|
|
134
|
-
jsx: true,
|
|
135
|
-
},
|
|
136
|
-
babelOptions: {
|
|
137
|
-
plugins: ["@babel/plugin-syntax-import-assertions"],
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
settings: {
|
|
141
|
-
react: {
|
|
142
|
-
version: "detect",
|
|
143
|
-
},
|
|
144
|
-
jest: {
|
|
145
|
-
version: 28,
|
|
146
|
-
},
|
|
147
|
-
"import/resolver": {
|
|
148
|
-
node: {
|
|
149
|
-
extensions: [".js", ".jsx", ".ts", ".tsx"],
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
ignorePatterns: [
|
|
154
|
-
"/build/**/*",
|
|
155
|
-
"/node_modules/**/*",
|
|
156
|
-
"/dist/**/*",
|
|
157
|
-
"/reports/**/*",
|
|
158
|
-
"/coverage/**/*",
|
|
159
|
-
"/demo/**/*",
|
|
160
|
-
"/docs/**/*",
|
|
161
|
-
"/temp/**/*",
|
|
162
|
-
"**/vendor/*.js",
|
|
163
|
-
],
|
|
164
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const {
|
|
2
|
-
baseExtends,
|
|
3
|
-
baseRules,
|
|
4
|
-
baseOverrides,
|
|
5
|
-
baseConfig,
|
|
6
|
-
} = require('./common.cjs');
|
|
7
|
-
const { tsConfig } = require('./typescript/non-react.cjs');
|
|
8
|
-
|
|
9
|
-
exports.esConfig = {
|
|
10
|
-
...baseConfig,
|
|
11
|
-
extends: ['airbnb-base'].concat(baseExtends),
|
|
12
|
-
rules: baseRules,
|
|
13
|
-
overrides: baseOverrides.concat([tsConfig]),
|
|
14
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const {
|
|
2
|
-
baseExtends,
|
|
3
|
-
baseRules,
|
|
4
|
-
baseOverrides,
|
|
5
|
-
baseConfig,
|
|
6
|
-
reactRules,
|
|
7
|
-
} = require('./common.cjs');
|
|
8
|
-
const { tsReactConfig } = require('./typescript/react.cjs');
|
|
9
|
-
|
|
10
|
-
exports.esReactConfig = {
|
|
11
|
-
...baseConfig,
|
|
12
|
-
extends: ['airbnb', 'airbnb/hooks', 'plugin:redux-saga/recommended'].concat(
|
|
13
|
-
baseExtends,
|
|
14
|
-
),
|
|
15
|
-
rules: {
|
|
16
|
-
...baseRules,
|
|
17
|
-
...reactRules,
|
|
18
|
-
},
|
|
19
|
-
overrides: baseOverrides.concat([
|
|
20
|
-
tsReactConfig,
|
|
21
|
-
{
|
|
22
|
-
files: '*.mdx',
|
|
23
|
-
extends: 'plugin:mdx/recommended',
|
|
24
|
-
},
|
|
25
|
-
]),
|
|
26
|
-
};
|