@enact/cli 5.0.0-alpha.1 → 5.0.0-alpha.4

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.
@@ -0,0 +1,28 @@
1
+ ### Checklist
2
+
3
+ * [ ] I have read and understand the [contribution guide](http://enactjs.com/docs/developer-guide/contributing/)
4
+ * [ ] A [CHANGELOG entry](http://enactjs.com/docs/developer-guide/contributing/changelogs/) is included
5
+ * [ ] At least one test case is included for this feature or bug fix
6
+ * [ ] Documentation was added or is not needed
7
+ * [ ] This is an API breaking change
8
+
9
+ ### Issue Resolved / Feature Added
10
+ [//]: # (Describe the issue resolved or feature added by this pull request)
11
+
12
+
13
+ ### Resolution
14
+ [//]: # (Does the code work as intended?)
15
+ [//]: # (What is the impact of this change and *why* was it made?)
16
+
17
+
18
+ ### Additional Considerations
19
+ [//]: # (How should the change be tested?)
20
+ [//]: # (Are there any outstanding questions?)
21
+ [//]: # (Were any side-effects caused by the change?)
22
+
23
+
24
+ ### Links
25
+ [//]: # (Related issues, references)
26
+
27
+
28
+ ### Comments
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 5.0.0-alpha.3 (April 28, 2022)
2
+
3
+ ### pack
4
+
5
+ * Fixed `enact pack` fails on windows by excluding unnecessary file emitting from `html-webpack-plugin`.
6
+
7
+ ### test
8
+
9
+ * Fixed `enact test` fails on windows by modifying glob patterns.
10
+ * Removed `enzyme` and related modules.
11
+
12
+ ## 5.0.0-alpha.3 (April 22, 2022)
13
+
14
+ ### lint
15
+
16
+ * Fixed `enact lint` is not working on node 16 by moving ESLint plugins to dependencies.
17
+
18
+ ### test
19
+
20
+ * Fixed `--watch` option is not working by fixing the version of `jest-watch-typeahead` to `0.6.5`.
21
+
22
+ ## 5.0.0-alpha.2 (April 15, 2022)
23
+
24
+ ### create, template
25
+
26
+ * Updated `@enact/template-sandstone` dependency.
27
+
1
28
  ## 5.0.0-alpha.1 (April 11, 2022)
2
29
 
3
30
  ### pack
package/commands/test.js CHANGED
@@ -151,11 +151,6 @@ function assignOverrides(config) {
151
151
  function api(args = []) {
152
152
  const config = require('../config/jest/jest.config');
153
153
 
154
- // Notify users that Enzyme is deprecated and will be removed in Enact CLI 5.0.0.
155
- console.warn(
156
- "\nWarning: 'enzyme' support is deprecated and will be removed in Enact CLI 5.0.0. Consider using '@testing-library/react' instead."
157
- );
158
-
159
154
  // @TODO: readd dotenv parse support
160
155
 
161
156
  // Watch unless on CI, in coverage mode, or explicitly running all tests
@@ -67,7 +67,7 @@ module.exports = {
67
67
  setupFilesAfterEnv: [require.resolve('./setupTests'), userSetupFile].filter(Boolean),
68
68
  testMatch: [
69
69
  '<rootDir>/**/__tests__/**/*.{js,jsx,ts,tsx}',
70
- '<rootDir>/**/?(*.)+(spec|test).[jt]s?(x)',
70
+ '<rootDir>/**/*.+(spec|test).{js,jsx,ts,tsx}',
71
71
  '<rootDir>/**/*-specs.{js,jsx,ts,tsx}'
72
72
  ],
73
73
  testPathIgnorePatterns: ignorePatterns,
@@ -85,7 +85,6 @@ module.exports = {
85
85
  ],
86
86
  moduleNameMapper: {
87
87
  '^.+\\.module\\.(css|less)$': require.resolve('identity-obj-proxy'),
88
- '^enzyme$': require.resolve('enzyme'),
89
88
  '^@testing-library/jest-dom$': require.resolve('@testing-library/jest-dom'),
90
89
  '^@testing-library/react$': require.resolve('@testing-library/react'),
91
90
  '^@testing-library/react-hooks$': require.resolve('@testing-library/react-hooks'),
@@ -1,8 +1,6 @@
1
1
  /* eslint-env jest */
2
2
  const fs = require('fs');
3
3
  const path = require('path');
4
- const enzyme = require('enzyme');
5
- const Adapter = require('@wojtekmaj/enzyme-adapter-react-17');
6
4
  const {packageRoot} = require('@enact/dev-utils');
7
5
 
8
6
  const filters = [
@@ -46,10 +44,6 @@ afterEach(() => {
46
44
  expect(actual).toHaveLength(expected);
47
45
  });
48
46
 
49
- // Configure Enzyme to use React16 adapter.
50
-
51
- enzyme.configure({adapter: new Adapter()});
52
-
53
47
  // Set initial resolution to VGA, similar to PhantomJS.
54
48
  // Will ideally want to use a more modern resolution later.
55
49
 
@@ -354,7 +354,7 @@ module.exports = function (env, ilibAdditionalResourcesPath) {
354
354
  // by webpacks internal loaders.
355
355
  // Exclude `ejs` HTML templating language as that's handled by
356
356
  // the HtmlWebpackPlugin.
357
- exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.ejs$/, /\.json$/],
357
+ exclude: [/^$/, /\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.ejs$/, /\.json$/],
358
358
  type: 'asset/resource'
359
359
  }
360
360
  // ** STOP ** Are you adding a new loader?
@@ -33,7 +33,7 @@ By default, projects will build in development mode. When you're code is ready f
33
33
  ## Browser Support & Polyfills
34
34
  The Enact CLI is designed to be compatible with a wide array of browsers and devices. [Browserslist standard](https://github.com/browserslist/browserslist) is used to handle targeting, with Enact's defaults being:
35
35
 
36
- * >1%
36
+ * \>1%
37
37
  * last 2 versions
38
38
  * last 5 Chrome versions
39
39
  * last 5 Firefox versions
@@ -105,7 +105,7 @@ npm install --save typescript @types/react @types/react-dom @types/jest
105
105
  Optionally, [ESLint](https://eslint.org) can be installed globally or locally and configured within a project to enable linting support within the `enact lint` command.
106
106
 
107
107
  ## Isomorphic Support & Prerendering
108
- By using the isomorphic code layout option, your project bundle will be outputted in a versatile universal code format allowing potential usage outside the browser. The Enact CLI takes advantage of this mode by additionally generating an HTML output of your project and embedding it directly with the resulting **index.html**. By default, isomorphic mode will attempt to prerender only `en-US`, however with the `--locales` option, a wade variety of locales can be specified and prerendered. More details on isomorphic support and its limitations can be found [here](./isomorphic-support.md).
108
+ By using the isomorphic code layout option, your project bundle will be outputted in a versatile universal code format allowing potential usage outside the browser. The Enact CLI takes advantage of this mode by additionally generating an HTML output of your project and embedding it directly with the resulting **index.html**. By default, isomorphic mode will attempt to prerender only `en-US`, however with the `--locales` option, a wide variety of locales can be specified and prerendered. More details on isomorphic support and its limitations can be found [here](./isomorphic-support.md).
109
109
 
110
110
  ## V8 Snapshot Generation
111
111
  The v8 snapshot blob creation feature is highly experimental and temperamental depending on your code. It is considered an extension of the isomorphic code layout, bringing along all the same requirements. Given the highly-specific nature of a v8 snapshot blob being tied to particular versions of Chrome/Chromium/Electron/etc., developers must provide their own copy of the `mksnapshot` binary and have its filepath set to the `V8_MKSNAPSHOT` environment variable.
@@ -18,9 +18,3 @@ All releases are published, with the default (and `latest` tag) being the curren
18
18
  ### Linux Notes
19
19
 
20
20
  When installing under Linux, it may be necessary to prefix the install command with `sudo`.
21
- Additionally, if you receive an error when the install process attempts to install PhantomJS, try
22
- the following:
23
-
24
- ```bash
25
- sudo npm install -g --unsafe-perm @enact/cli
26
- ```
@@ -15,7 +15,6 @@ order: 7
15
15
  The `enact test` command (aliased as `npm run test`) will activate a [Jest](https://jestjs.io/) test runner on all discovered *-specs.js files. All the complicated configuration is hidden away within Enact CLI to avoid any confusion or additional difficulty in testing source code.
16
16
 
17
17
  Internally Enact CLI supports [React Testing Library](https://testing-library.com/docs/react-testing-library/intro) out of the box, so there's no need to install them locally on your project. Simply import/require it within specs files and it'll be there. You will want to familiarize yourself with React Testing Library's utilities in order to write more complex tests.
18
- Enzyme support is deprecated and will be removed in a future major release.
19
18
 
20
19
  To create a test please create a ***-specs.js** file in the folder of the component you wish to test.
21
20