@nx/web 19.1.0-beta.0 → 19.1.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/web",
3
- "version": "19.1.0-beta.0",
3
+ "version": "19.1.0-beta.2",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Web Components contains generators for managing Web Component applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Playwright, Cypress, and Storybook.\n\n- Scaffolding for creating buildable libraries that can be published to npm.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -13,9 +13,10 @@
13
13
  "Web",
14
14
  "Jest",
15
15
  "Cypress",
16
- "CLI"
16
+ "CLI",
17
+ "Front-end"
17
18
  ],
18
- "main": "./index.js",
19
+ "main": "./index",
19
20
  "typings": "./index.d.ts",
20
21
  "author": "Victor Savkin",
21
22
  "license": "MIT",
@@ -34,9 +35,9 @@
34
35
  "detect-port": "^1.5.1",
35
36
  "http-server": "^14.1.0",
36
37
  "tslib": "^2.3.0",
37
- "@nx/devkit": "19.1.0-beta.0",
38
- "@nx/js": "19.1.0-beta.0",
39
- "@nrwl/web": "19.1.0-beta.0"
38
+ "@nx/devkit": "19.1.0-beta.2",
39
+ "@nx/js": "19.1.0-beta.2",
40
+ "@nrwl/web": "19.1.0-beta.2"
40
41
  },
41
42
  "publishConfig": {
42
43
  "access": "public"
@@ -49,6 +49,15 @@ function createApplicationFiles(tree, options) {
49
49
  tree.delete((0, path_1.join)(options.appProjectRoot, './src/app/app.element.spec.ts'));
50
50
  }
51
51
  }
52
+ (0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.json'), (json) => {
53
+ return {
54
+ ...json,
55
+ compilerOptions: {
56
+ ...(json.compilerOptions || {}),
57
+ strict: options.strict,
58
+ },
59
+ };
60
+ });
52
61
  }
53
62
  async function setupBundler(tree, options) {
54
63
  const main = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'src/main.ts');
@@ -358,9 +367,6 @@ async function normalizeOptions(host, options) {
358
367
  const parsedTags = options.tags
359
368
  ? options.tags.split(',').map((s) => s.trim())
360
369
  : [];
361
- if (options.bundler === 'vite' && options.unitTestRunner !== 'none') {
362
- options.unitTestRunner = 'vitest';
363
- }
364
370
  options.style = options.style || 'css';
365
371
  options.linter = options.linter || 'eslint';
366
372
  options.unitTestRunner = options.unitTestRunner || 'jest';
@@ -372,6 +378,7 @@ async function normalizeOptions(host, options) {
372
378
  compiler: options.compiler ?? 'babel',
373
379
  bundler: options.bundler ?? 'webpack',
374
380
  projectName: appProjectName,
381
+ strict: options.strict ?? true,
375
382
  appProjectRoot,
376
383
  e2eProjectRoot,
377
384
  e2eProjectName,
@@ -17,5 +17,6 @@ export interface Schema {
17
17
  linter?: Linter;
18
18
  standaloneConfig?: boolean;
19
19
  setParserOptionsProject?: boolean;
20
+ strict?: boolean;
20
21
  addPlugin?: boolean;
21
22
  }
@@ -101,6 +101,11 @@
101
101
  "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
102
102
  "default": false
103
103
  },
104
+ "strict": {
105
+ "type": "boolean",
106
+ "description": "Creates an application with strict mode and strict type checking.",
107
+ "default": true
108
+ },
104
109
  "standaloneConfig": {
105
110
  "description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside workspace.json",
106
111
  "type": "boolean",