@elliemae/pui-cli 6.0.0-beta.27 → 6.0.0-beta.28

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.
@@ -1,5 +1,6 @@
1
1
  const path = require('path');
2
2
  const { getAppConfig, getAssetPath } = require('../webpack/helpers');
3
+ const swcrcConfig = require('../transpile/swcrc.config.js');
3
4
 
4
5
  const name = '@elliemae/pui-cli';
5
6
  const rootDir = path.join('<rootDir>', 'node_modules', name);
@@ -66,6 +67,9 @@ const jestConfig = {
66
67
  '@elliemae/pui-user-monitoring': `${getRootDir()}/lib/testing/mocks/pui-user-monitoring.js`,
67
68
  '@elliemae/pui-app-loader': `${getRootDir()}/lib/testing/mocks/pui-app-loader.js`,
68
69
  '@elliemae/pui-diagnostics': `${getRootDir()}/lib/testing/mocks/pui-diagnostics.js`,
70
+ 'react-spring/web': '<rootDir>/node_modules/react-spring/web.cjs.js',
71
+ 'react-spring/renderprops':
72
+ '<rootDir>/node_modules/react-spring/renderprops.cjs.js',
69
73
  'styled-components':
70
74
  '<rootDir>/node_modules/styled-components/dist/styled-components.cjs.js',
71
75
  },
@@ -76,18 +80,21 @@ const jestConfig = {
76
80
  testResultsProcessor: 'jest-sonar-reporter',
77
81
  resolver: path.resolve(__dirname, './resolver.js'),
78
82
  transform: {
79
- '^.+\\.[jt]sx?$': [
80
- 'esbuild-jest',
81
- {
82
- target: 'es2020',
83
- loaders: {
84
- '.js': 'jsx',
85
- },
86
- },
87
- ],
83
+ '^.+\\.[jt]sx?$': ['@swc/jest', swcrcConfig],
88
84
  },
85
+ // transform: {
86
+ // '^.+\\.[jt]sx?$': [
87
+ // 'esbuild-jest',
88
+ // {
89
+ // target: 'es2020',
90
+ // loaders: {
91
+ // '.js': 'jsx',
92
+ // },
93
+ // },
94
+ // ],
95
+ // },
89
96
  transformIgnorePatterns: [
90
- 'node_modules/(?!(@elliemae/em-platform-document-viewer|@elliemae/pui-cli|@elliemae/pui-app-widgets|lodash-es|react-spring|react-select|react-dates|@babel/runtime)/)',
97
+ 'node_modules/(?!(@elliemae/pui-cli|lodash-es|react-select|react-dates)/)',
91
98
  ],
92
99
  globals: {
93
100
  APP_CONFIG: getAppConfig(),
@@ -99,6 +106,6 @@ const jestConfig = {
99
106
 
100
107
  if (isReactModule && jestConfig.setupFilesAfterEnv)
101
108
  jestConfig.setupFilesAfterEnv.push(
102
- `${getRootDir()}/lib/testing/setup-styled-components-tests.js`,
109
+ `${getRootDir()}/lib/testing/setup-react-env.js`,
103
110
  );
104
111
  module.exports = jestConfig;
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import 'jest-styled-components';
3
+ global.React = React;
@@ -0,0 +1,11 @@
1
+ {
2
+ "jsc": {
3
+ "parser": {
4
+ "syntax": "typescript",
5
+ "jsx": true,
6
+ "tsx": true,
7
+ "dynamicImport": true
8
+ },
9
+ "target": "es2020"
10
+ }
11
+ }
@@ -0,0 +1,13 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+ const { merge } = require('lodash');
4
+
5
+ let projectConfig = {};
6
+ const projectPath = path.join(process.cwd(), '.swcrc');
7
+ if (fs.existsSync(projectPath)) {
8
+ projectConfig = JSON.parse(fs.readFileSync(projectPath, 'utf-8'));
9
+ }
10
+ const localConfig = JSON.parse(
11
+ fs.readFileSync(path.join(__dirname, '.swcrc'), 'utf-8'),
12
+ );
13
+ module.exports = merge(localConfig, projectConfig);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/pui-cli",
3
- "version": "6.0.0-beta.27",
3
+ "version": "6.0.0-beta.28",
4
4
  "private": false,
5
5
  "description": "ICE MT UI Platform CLI",
6
6
  "sideEffects": false,
@@ -70,18 +70,21 @@
70
70
  "@semantic-release/changelog": "~6.0.1",
71
71
  "@semantic-release/exec": "~6.0.2",
72
72
  "@semantic-release/git": "~10.0.1",
73
- "@storybook/addon-a11y": "~6.4.8",
74
- "@storybook/addon-essentials": "~6.4.8",
73
+ "@storybook/addon-a11y": "~6.4.9",
74
+ "@storybook/addon-essentials": "~6.4.9",
75
75
  "@storybook/addon-events": "~6.2.9",
76
- "@storybook/addon-interactions": "~6.4.8",
77
- "@storybook/addon-links": "~6.4.8",
78
- "@storybook/addon-storysource": "~6.4.8",
79
- "@storybook/builder-webpack5": "~6.4.8",
80
- "@storybook/manager-webpack5": "~6.4.8",
81
- "@storybook/react": "~6.4.8",
82
- "@storybook/theming": "~6.4.8",
76
+ "@storybook/addon-interactions": "~6.4.9",
77
+ "@storybook/addon-links": "~6.4.9",
78
+ "@storybook/addon-storysource": "~6.4.9",
79
+ "@storybook/builder-webpack5": "~6.4.9",
80
+ "@storybook/manager-webpack5": "~6.4.9",
81
+ "@storybook/react": "~6.4.9",
82
+ "@storybook/theming": "~6.4.9",
83
83
  "@stylelint/postcss-css-in-js": "~0.37.2",
84
84
  "@svgr/webpack": "~6.1.1",
85
+ "@swc/cli": "~0.1.52",
86
+ "@swc/core": "~1.2.118",
87
+ "@swc/jest": "~0.2.12",
85
88
  "@testing-library/jest-dom": "~5.16.1",
86
89
  "@testing-library/react": "~12.1.2",
87
90
  "@testing-library/react-hooks": "~7.0.2",
@@ -149,7 +152,7 @@
149
152
  "eslint-plugin-prettier": "~4.0.0",
150
153
  "eslint-plugin-react": "~7.27.1",
151
154
  "eslint-plugin-react-hooks": "~4.3.0",
152
- "eslint-plugin-redux-saga": "~1.2.2",
155
+ "eslint-plugin-redux-saga": "~1.3.2",
153
156
  "eslint-plugin-storybook": "~0.5.3",
154
157
  "eslint-plugin-testing-library": "~5.0.1",
155
158
  "eslint-plugin-wdio": "~7.4.2",
@@ -189,7 +192,7 @@
189
192
  "pino": "~7.5.1",
190
193
  "pino-pretty": "~7.2.0",
191
194
  "pinst": "~2.1.6",
192
- "plop": "~3.0.3",
195
+ "plop": "~3.0.4",
193
196
  "postcss": "~8.4.4",
194
197
  "postcss-jsx": "~0.36.4",
195
198
  "postcss-html": "~1.3.0",
@@ -224,6 +227,7 @@
224
227
  "stylelint-processor-styled-components": "~1.10.0",
225
228
  "svg-url-loader": "~7.1.1",
226
229
  "svgo": "~2.8.0",
230
+ "swc-loader": "~0.1.15",
227
231
  "terser-webpack-plugin": "~5.2.5",
228
232
  "ts-node": "~10.4.0",
229
233
  "tsc-alias": "~1.4.2",
@@ -1 +0,0 @@
1
- import 'jest-styled-components';