@enact/cli 5.1.0 → 5.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 5.1.1 (February 10, 2023)
2
+
3
+ * Fixed `eslint-plugin-react` version to `7.31.11` temporarily.
4
+ * Updated dependencies.
5
+
6
+ ### pack
7
+
8
+ * Updated `babel.config.js` to use `babel-preset-enact` module that holds the babel config for Enact.
9
+
1
10
  ## 5.1.0 (November 4, 2022)
2
11
 
3
12
  * Unpinned versions of dependencies.
package/commands/info.js CHANGED
@@ -103,6 +103,7 @@ function api({cliInfo = false, dev = false} = {}) {
103
103
  console.log(chalk.yellow.bold('==Enact Components=='));
104
104
  [
105
105
  '@enact/dev-utils',
106
+ 'babel-preset-enact',
106
107
  'eslint-config-enact',
107
108
  'eslint-plugin-enact',
108
109
  'postcss-resolution-independence'
@@ -1,132 +1 @@
1
- /*
2
- * babel.config.js
3
- *
4
- * A Babel javascript configuration dynamically setup for Enact
5
- * development environment on target platforms.
6
- */
7
- const path = require('path');
8
-
9
- // Check if JSX transform is able
10
- const hasJsxRuntime = (() => {
11
- if (process.env.DISABLE_NEW_JSX_TRANSFORM === 'true') {
12
- return false;
13
- }
14
-
15
- try {
16
- require.resolve('react/jsx-runtime');
17
- return true;
18
- } catch (e) {
19
- return false;
20
- }
21
- })();
22
-
23
- module.exports = function (api) {
24
- const env = process.env.BABEL_ENV || process.env.NODE_ENV;
25
- const es5Standalone = process.env.ES5 && process.env.ES5 !== 'false';
26
-
27
- if (api && api.cache) api.cache(() => env + es5Standalone);
28
-
29
- return {
30
- presets: [
31
- [
32
- require('@babel/preset-env').default,
33
- {
34
- exclude: [
35
- // Exclude transforms that make all code slower
36
- 'transform-typeof-symbol',
37
- // Exclude chunky/costly transforms
38
- 'transform-regenerator',
39
- // Ignore web features since window and DOM is not available
40
- // in a V8 snapshot blob.
41
- // TODO: investigates ways to include but delay loading.
42
- 'web.dom-collections.for-each',
43
- 'web.dom-collections.iterator',
44
- 'web.immediate',
45
- 'web.queue-microtask',
46
- 'web.timers',
47
- 'web.url',
48
- 'web.url.to-json',
49
- 'web.url-search-params'
50
- ],
51
- forceAllTransforms: es5Standalone,
52
- useBuiltIns: 'entry',
53
- corejs: 3
54
- }
55
- ],
56
- [
57
- require('@babel/preset-react').default,
58
- {
59
- // Adds component stack to warning messages
60
- // Adds __self attribute to JSX which React will use for some warnings
61
- development: env !== 'production' && !es5Standalone,
62
- // Will use the native built-in instead of trying to polyfill
63
- // behavior for any plugins that require one.
64
- ...(!hasJsxRuntime ? {useBuiltIns: true} : {runtime: 'automatic'})
65
- }
66
- ],
67
- ['@babel/preset-typescript']
68
- ],
69
- plugins: [
70
- // Stage 0
71
- // '@babel/plugin-proposal-function-bind',
72
-
73
- // Stage 1
74
- require('@babel/plugin-proposal-export-default-from').default,
75
- // '@babel/plugin-proposal-logical-assignment-operators',
76
- // ['@babel/plugin-proposal-pipeline-operator', { 'proposal': 'minimal' }],
77
- // '@babel/plugin-proposal-do-expressions',
78
-
79
- // Stage 2
80
- [require('@babel/plugin-proposal-decorators').default, false],
81
- require('@babel/plugin-proposal-export-namespace-from').default,
82
- require('@babel/plugin-proposal-numeric-separator').default,
83
- // '@babel/plugin-proposal-function-sent',
84
- // '@babel/plugin-proposal-throw-expressions',
85
-
86
- // Stage 3
87
- require('@babel/plugin-syntax-dynamic-import').default,
88
- [require('@babel/plugin-proposal-class-properties').default, {loose: true}],
89
- [require('@babel/plugin-proposal-private-methods').default, {loose: true}],
90
- [require('@babel/plugin-proposal-private-property-in-object').default, {loose: true}],
91
- // '@babel/plugin-syntax-import-meta',
92
- // '@babel/plugin-proposal-json-strings'
93
-
94
- // Soon to be included within pre-env; include here until then
95
- require('@babel/plugin-proposal-optional-chaining').default,
96
- require('@babel/plugin-proposal-nullish-coalescing-operator').default,
97
-
98
- !es5Standalone && [
99
- require('@babel/plugin-transform-runtime').default,
100
- {
101
- corejs: false,
102
- helpers: true,
103
- // Explicitly resolve runtime version to avoid issue
104
- // https://github.com/babel/babel/issues/10261
105
- version: require('@babel/runtime/package.json').version,
106
- regenerator: false,
107
- useESModules: !es5Standalone,
108
- // @remove-on-eject-begin
109
- // Undocumented option to use CLI-contained runtime, ensuring
110
- // the correct version
111
- absoluteRuntime: path.dirname(require.resolve('@babel/runtime/package.json'))
112
- // @remove-on-eject-end
113
- }
114
- ],
115
-
116
- require('babel-plugin-dev-expression'),
117
- env === 'test' && !es5Standalone && require('babel-plugin-dynamic-import-node').default,
118
- env === 'production' && !es5Standalone && require('@babel/plugin-transform-react-inline-elements').default,
119
- env === 'production' &&
120
- !es5Standalone && [
121
- require('babel-plugin-transform-react-remove-prop-types').default,
122
- {removeImport: true}
123
- ]
124
- ].filter(Boolean),
125
- overrides: [
126
- {
127
- test: /\.tsx?$/,
128
- plugins: [[require('@babel/plugin-proposal-decorators').default, {legacy: true}]]
129
- }
130
- ]
131
- };
132
- };
1
+ module.exports = require('babel-preset-enact');