@nx/nest 20.3.1 → 20.3.3

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2024 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2025 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/nest",
3
- "version": "20.3.1",
3
+ "version": "20.3.3",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Nest contains executors and generators for allowing your workspace to create powerful Nest best in class APIs.",
6
6
  "repository": {
@@ -32,10 +32,10 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@nestjs/schematics": "^9.1.0",
35
- "@nx/devkit": "20.3.1",
36
- "@nx/js": "20.3.1",
37
- "@nx/eslint": "20.3.1",
38
- "@nx/node": "20.3.1",
35
+ "@nx/devkit": "20.3.3",
36
+ "@nx/js": "20.3.3",
37
+ "@nx/eslint": "20.3.3",
38
+ "@nx/node": "20.3.3",
39
39
  "tslib": "^2.3.0"
40
40
  },
41
41
  "publishConfig": {
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateTsConfig = updateTsConfig;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
6
  function updateTsConfig(tree, options) {
6
7
  (0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.app.json'), (json) => {
8
+ json.compilerOptions.experimentalDecorators = true;
7
9
  json.compilerOptions.emitDecoratorMetadata = true;
8
10
  json.compilerOptions.target = 'es2021';
9
11
  if (options.strict) {
@@ -18,4 +20,16 @@ function updateTsConfig(tree, options) {
18
20
  }
19
21
  return json;
20
22
  });
23
+ // For TS solution, we don't extend from shared tsconfig.json, so we need to make sure decorators are also turned on for spec tsconfig.
24
+ if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree)) {
25
+ const tsconfigSpecPath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'tsconfig.spec.json');
26
+ if (tree.exists(tsconfigSpecPath)) {
27
+ (0, devkit_1.updateJson)(tree, tsconfigSpecPath, (json) => {
28
+ json.compilerOptions ??= {};
29
+ json.compilerOptions.experimentalDecorators = true;
30
+ json.compilerOptions.emitDecoratorMetadata = true;
31
+ return json;
32
+ });
33
+ }
34
+ }
21
35
  }
@@ -16,7 +16,7 @@ async function libraryGenerator(tree, rawOptions) {
16
16
  }
17
17
  async function libraryGeneratorInternal(tree, rawOptions) {
18
18
  const options = await (0, lib_1.normalizeOptions)(tree, rawOptions);
19
- await (0, js_1.libraryGenerator)(tree, (0, lib_1.toJsLibraryGeneratorOptions)(options));
19
+ const jsLibraryTask = await (0, js_1.libraryGenerator)(tree, (0, lib_1.toJsLibraryGeneratorOptions)(options));
20
20
  const initTask = await (0, init_1.default)(tree, rawOptions);
21
21
  const depsTask = (0, ensure_dependencies_1.ensureDependencies)(tree);
22
22
  (0, lib_1.deleteFiles)(tree, options);
@@ -28,6 +28,7 @@ async function libraryGeneratorInternal(tree, rawOptions) {
28
28
  await (0, devkit_1.formatFiles)(tree);
29
29
  }
30
30
  return (0, devkit_1.runTasksInSerial)(...[
31
+ jsLibraryTask,
31
32
  initTask,
32
33
  depsTask,
33
34
  () => {