@nx/js 16.0.0-beta.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.
Files changed (184) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE +22 -0
  3. package/README.md +63 -0
  4. package/babel.d.ts +10 -0
  5. package/babel.js +89 -0
  6. package/babel.js.map +1 -0
  7. package/executors.json +37 -0
  8. package/generators.json +52 -0
  9. package/migrations.json +60 -0
  10. package/package.json +64 -0
  11. package/src/executors/node/compat.d.ts +2 -0
  12. package/src/executors/node/compat.js +6 -0
  13. package/src/executors/node/compat.js.map +1 -0
  14. package/src/executors/node/node-with-require-overrides.d.ts +5 -0
  15. package/src/executors/node/node-with-require-overrides.js +20 -0
  16. package/src/executors/node/node-with-require-overrides.js.map +1 -0
  17. package/src/executors/node/node.impl.d.ts +8 -0
  18. package/src/executors/node/node.impl.js +184 -0
  19. package/src/executors/node/node.impl.js.map +1 -0
  20. package/src/executors/node/schema.d.ts +16 -0
  21. package/src/executors/node/schema.json +74 -0
  22. package/src/executors/swc/compat.d.ts +2 -0
  23. package/src/executors/swc/compat.js +6 -0
  24. package/src/executors/swc/compat.js.map +1 -0
  25. package/src/executors/swc/schema.json +147 -0
  26. package/src/executors/swc/swc.impl.d.ts +11 -0
  27. package/src/executors/swc/swc.impl.js +126 -0
  28. package/src/executors/swc/swc.impl.js.map +1 -0
  29. package/src/executors/tsc/compat.d.ts +2 -0
  30. package/src/executors/tsc/compat.js +6 -0
  31. package/src/executors/tsc/compat.js.map +1 -0
  32. package/src/executors/tsc/schema.json +156 -0
  33. package/src/executors/tsc/tsc.impl.d.ts +7 -0
  34. package/src/executors/tsc/tsc.impl.js +106 -0
  35. package/src/executors/tsc/tsc.impl.js.map +1 -0
  36. package/src/generators/convert-to-swc/convert-to-swc.d.ts +5 -0
  37. package/src/generators/convert-to-swc/convert-to-swc.js +62 -0
  38. package/src/generators/convert-to-swc/convert-to-swc.js.map +1 -0
  39. package/src/generators/convert-to-swc/schema.d.ts +4 -0
  40. package/src/generators/convert-to-swc/schema.json +36 -0
  41. package/src/generators/init/files/__fileName__ +20 -0
  42. package/src/generators/init/init.d.ts +5 -0
  43. package/src/generators/init/init.js +67 -0
  44. package/src/generators/init/init.js.map +1 -0
  45. package/src/generators/init/schema.d.ts +6 -0
  46. package/src/generators/init/schema.json +30 -0
  47. package/src/generators/library/files/jest-config/jest.config.__ext__ +24 -0
  48. package/src/generators/library/files/lib/README.md +19 -0
  49. package/src/generators/library/files/lib/src/index.ts__tmpl__ +1 -0
  50. package/src/generators/library/files/lib/src/lib/__fileName__.spec.ts__tmpl__ +7 -0
  51. package/src/generators/library/files/lib/src/lib/__fileName__.ts__tmpl__ +3 -0
  52. package/src/generators/library/files/lib/tsconfig.json__tmpl__ +14 -0
  53. package/src/generators/library/files/lib/tsconfig.lib.json__tmpl__ +10 -0
  54. package/src/generators/library/library.d.ts +15 -0
  55. package/src/generators/library/library.js +388 -0
  56. package/src/generators/library/library.js.map +1 -0
  57. package/src/generators/library/schema.json +134 -0
  58. package/src/index.d.ts +15 -0
  59. package/src/index.js +24 -0
  60. package/src/index.js.map +1 -0
  61. package/src/migrations/update-13-10-1/update-lib-swcrc-exclude.d.ts +2 -0
  62. package/src/migrations/update-13-10-1/update-lib-swcrc-exclude.js +32 -0
  63. package/src/migrations/update-13-10-1/update-lib-swcrc-exclude.js.map +1 -0
  64. package/src/migrations/update-13-8-5/update-node-executor.d.ts +2 -0
  65. package/src/migrations/update-13-8-5/update-node-executor.js +28 -0
  66. package/src/migrations/update-13-8-5/update-node-executor.js.map +1 -0
  67. package/src/migrations/update-13-8-5/update-swcrc.d.ts +2 -0
  68. package/src/migrations/update-13-8-5/update-swcrc.js +35 -0
  69. package/src/migrations/update-13-8-5/update-swcrc.js.map +1 -0
  70. package/src/migrations/update-14-0-0/exclude-jest-config-swcrc.d.ts +3 -0
  71. package/src/migrations/update-14-0-0/exclude-jest-config-swcrc.js +27 -0
  72. package/src/migrations/update-14-0-0/exclude-jest-config-swcrc.js.map +1 -0
  73. package/src/migrations/update-14-1-5/update-swcrc-path.d.ts +3 -0
  74. package/src/migrations/update-14-1-5/update-swcrc-path.js +30 -0
  75. package/src/migrations/update-14-1-5/update-swcrc-path.js.map +1 -0
  76. package/src/migrations/update-15-8-0/rename-swcrc-config.d.ts +2 -0
  77. package/src/migrations/update-15-8-0/rename-swcrc-config.js +81 -0
  78. package/src/migrations/update-15-8-0/rename-swcrc-config.js.map +1 -0
  79. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.d.ts +2 -0
  80. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +13 -0
  81. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js.map +1 -0
  82. package/src/utils/add-babel-inputs.d.ts +2 -0
  83. package/src/utils/add-babel-inputs.js +23 -0
  84. package/src/utils/add-babel-inputs.js.map +1 -0
  85. package/src/utils/assets/assets.d.ts +10 -0
  86. package/src/utils/assets/assets.js +38 -0
  87. package/src/utils/assets/assets.js.map +1 -0
  88. package/src/utils/assets/copy-assets-handler.d.ts +28 -0
  89. package/src/utils/assets/copy-assets-handler.js +155 -0
  90. package/src/utils/assets/copy-assets-handler.js.map +1 -0
  91. package/src/utils/assets/index.d.ts +16 -0
  92. package/src/utils/assets/index.js +31 -0
  93. package/src/utils/assets/index.js.map +1 -0
  94. package/src/utils/buildable-libs-utils.d.ts +32 -0
  95. package/src/utils/buildable-libs-utils.js +309 -0
  96. package/src/utils/buildable-libs-utils.js.map +1 -0
  97. package/src/utils/check-dependencies.d.ts +8 -0
  98. package/src/utils/check-dependencies.js +24 -0
  99. package/src/utils/check-dependencies.js.map +1 -0
  100. package/src/utils/code-frames/highlight.d.ts +1 -0
  101. package/src/utils/code-frames/highlight.js +87 -0
  102. package/src/utils/code-frames/highlight.js.map +1 -0
  103. package/src/utils/code-frames/identifiers.d.ts +5 -0
  104. package/src/utils/code-frames/identifiers.js +53 -0
  105. package/src/utils/code-frames/identifiers.js.map +1 -0
  106. package/src/utils/compiler-helper-dependency.d.ts +17 -0
  107. package/src/utils/compiler-helper-dependency.js +111 -0
  108. package/src/utils/compiler-helper-dependency.js.map +1 -0
  109. package/src/utils/generate-globs.d.ts +6 -0
  110. package/src/utils/generate-globs.js +81 -0
  111. package/src/utils/generate-globs.js.map +1 -0
  112. package/src/utils/inline.d.ts +19 -0
  113. package/src/utils/inline.js +211 -0
  114. package/src/utils/inline.js.map +1 -0
  115. package/src/utils/minimal-publish-script.d.ts +2 -0
  116. package/src/utils/minimal-publish-script.js +76 -0
  117. package/src/utils/minimal-publish-script.js.map +1 -0
  118. package/src/utils/package-json/index.d.ts +13 -0
  119. package/src/utils/package-json/index.js +34 -0
  120. package/src/utils/package-json/index.js.map +1 -0
  121. package/src/utils/package-json/update-package-json.d.ts +20 -0
  122. package/src/utils/package-json/update-package-json.js +142 -0
  123. package/src/utils/package-json/update-package-json.js.map +1 -0
  124. package/src/utils/prettier.d.ts +6 -0
  125. package/src/utils/prettier.js +38 -0
  126. package/src/utils/prettier.js.map +1 -0
  127. package/src/utils/schema.d.ts +81 -0
  128. package/src/utils/swc/add-swc-config.d.ts +3 -0
  129. package/src/utils/swc/add-swc-config.js +44 -0
  130. package/src/utils/swc/add-swc-config.js.map +1 -0
  131. package/src/utils/swc/add-swc-dependencies.d.ts +2 -0
  132. package/src/utils/swc/add-swc-dependencies.js +15 -0
  133. package/src/utils/swc/add-swc-dependencies.js.map +1 -0
  134. package/src/utils/swc/compile-swc.d.ts +13 -0
  135. package/src/utils/swc/compile-swc.js +161 -0
  136. package/src/utils/swc/compile-swc.js.map +1 -0
  137. package/src/utils/swc/get-swcrc-path.d.ts +2 -0
  138. package/src/utils/swc/get-swcrc-path.js +14 -0
  139. package/src/utils/swc/get-swcrc-path.js.map +1 -0
  140. package/src/utils/swc/inline.d.ts +2 -0
  141. package/src/utils/swc/inline.js +13 -0
  142. package/src/utils/swc/inline.js.map +1 -0
  143. package/src/utils/typescript/__mocks__/plugin-a.d.ts +1 -0
  144. package/src/utils/typescript/__mocks__/plugin-a.js +6 -0
  145. package/src/utils/typescript/__mocks__/plugin-a.js.map +1 -0
  146. package/src/utils/typescript/__mocks__/plugin-b.d.ts +1 -0
  147. package/src/utils/typescript/__mocks__/plugin-b.js +6 -0
  148. package/src/utils/typescript/__mocks__/plugin-b.js.map +1 -0
  149. package/src/utils/typescript/ast-utils.d.ts +22 -0
  150. package/src/utils/typescript/ast-utils.js +199 -0
  151. package/src/utils/typescript/ast-utils.js.map +1 -0
  152. package/src/utils/typescript/compile-typescript-files.d.ts +10 -0
  153. package/src/utils/typescript/compile-typescript-files.js +45 -0
  154. package/src/utils/typescript/compile-typescript-files.js.map +1 -0
  155. package/src/utils/typescript/create-ts-config.d.ts +17 -0
  156. package/src/utils/typescript/create-ts-config.js +48 -0
  157. package/src/utils/typescript/create-ts-config.js.map +1 -0
  158. package/src/utils/typescript/ensure-typescript.d.ts +1 -0
  159. package/src/utils/typescript/ensure-typescript.js +10 -0
  160. package/src/utils/typescript/ensure-typescript.js.map +1 -0
  161. package/src/utils/typescript/get-source-nodes.d.ts +2 -0
  162. package/src/utils/typescript/get-source-nodes.js +19 -0
  163. package/src/utils/typescript/get-source-nodes.js.map +1 -0
  164. package/src/utils/typescript/load-ts-transformers.d.ts +5 -0
  165. package/src/utils/typescript/load-ts-transformers.js +63 -0
  166. package/src/utils/typescript/load-ts-transformers.js.map +1 -0
  167. package/src/utils/typescript/print-diagnostics.d.ts +1 -0
  168. package/src/utils/typescript/print-diagnostics.js +22 -0
  169. package/src/utils/typescript/print-diagnostics.js.map +1 -0
  170. package/src/utils/typescript/run-type-check.d.ts +32 -0
  171. package/src/utils/typescript/run-type-check.js +125 -0
  172. package/src/utils/typescript/run-type-check.js.map +1 -0
  173. package/src/utils/typescript/ts-config.d.ts +6 -0
  174. package/src/utils/typescript/ts-config.js +50 -0
  175. package/src/utils/typescript/ts-config.js.map +1 -0
  176. package/src/utils/typescript/types.d.ts +18 -0
  177. package/src/utils/typescript/types.js +3 -0
  178. package/src/utils/typescript/types.js.map +1 -0
  179. package/src/utils/versions.d.ts +8 -0
  180. package/src/utils/versions.js +13 -0
  181. package/src/utils/versions.js.map +1 -0
  182. package/src/utils/watch-for-single-file-changes.d.ts +1 -0
  183. package/src/utils/watch-for-single-file-changes.js +27 -0
  184. package/src/utils/watch-for-single-file-changes.js.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+
7
+
8
+ **Note:** Version bump only for package @nx/js
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ (The MIT License)
2
+
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ 'Software'), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
2
+
3
+ <div style="text-align: center;">
4
+
5
+ [![CircleCI](https://circleci.com/gh/nrwl/nx.svg?style=svg)](https://circleci.com/gh/nrwl/nx)
6
+ [![License](https://img.shields.io/npm/l/@nrwl/workspace.svg?style=flat-square)]()
7
+ [![NPM Version](https://badge.fury.io/js/%40nrwl%2Fworkspace.svg)](https://www.npmjs.com/@nrwl/workspace)
8
+ [![Semantic Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)]()
9
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
10
+ [![Join the chat at https://gitter.im/nrwl-nx/community](https://badges.gitter.im/nrwl-nx/community.svg)](https://gitter.im/nrwl-nx/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
11
+ [![Join us @nrwl/community on slack](https://img.shields.io/badge/slack-%40nrwl%2Fcommunity-brightgreen)](https://join.slack.com/t/nrwlcommunity/shared_invite/enQtNzU5MTE4OTQwOTk0LTgxY2E0ZWYzMWE0YzA5ZDA2MWM1NDVhNmI2ZWMyYmZhNWJiODk3MjkxZjY3MzU5ZjRmM2NmNWU1OTgyZmE4Mzc)
12
+
13
+ </div>
14
+
15
+
16
+ <hr>
17
+
18
+ # Nx: Smart, Fast and Extensible Build System
19
+
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
21
+
22
+ This package is a [JavaScript/TypeScript plugin for Nx](https://nx.dev/js/overview).
23
+
24
+ ## Getting Started
25
+
26
+ ### Creating an Nx Workspace
27
+
28
+ **Using `npx`**
29
+
30
+ ```bash
31
+ npx create-nx-workspace
32
+ ```
33
+
34
+ **Using `npm init`**
35
+
36
+ ```bash
37
+ npm init nx-workspace
38
+ ```
39
+
40
+ **Using `yarn create`**
41
+
42
+ ```bash
43
+ yarn create nx-workspace
44
+ ```
45
+
46
+ ### Adding Nx to an Existing Repository
47
+
48
+ Run:
49
+
50
+ ```bash
51
+ npx nx@latest init
52
+ ```
53
+
54
+ ## Documentation & Resources
55
+
56
+ - [Nx.Dev: Documentation, Guides, Tutorials](https://nx.dev)
57
+ - [Intro to Nx](https://nx.dev/getting-started/intro)
58
+ - [Official Nx YouTube Channel](https://www.youtube.com/@NxDevtools)
59
+ - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
60
+
61
+ <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
62
+ width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
63
+
package/babel.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export interface NxWebBabelPresetOptions {
2
+ useBuiltIns?: boolean | string;
3
+ decorators?: {
4
+ decoratorsBeforeExport?: boolean;
5
+ legacy?: boolean;
6
+ };
7
+ classProperties?: {
8
+ loose?: boolean;
9
+ };
10
+ }
package/babel.js ADDED
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const path_1 = require("path");
4
+ module.exports = function (api, options = {}) {
5
+ var _a, _b, _c;
6
+ api.assertVersion(7);
7
+ const isModern = api.caller((caller) => caller === null || caller === void 0 ? void 0 : caller.isModern);
8
+ // This is set by `@nrwl/web:rollup` executor
9
+ const isNxPackage = api.caller((caller) => caller === null || caller === void 0 ? void 0 : caller.isNxPackage);
10
+ const emitDecoratorMetadata = api.caller((caller) => { var _a; return (_a = caller === null || caller === void 0 ? void 0 : caller.emitDecoratorMetadata) !== null && _a !== void 0 ? _a : true; });
11
+ // Determine settings for `@babel/plugin-proposal-class-properties`,
12
+ // so that we can sync the `loose` option with `@babel/preset-env`.
13
+ const classProperties = (_a = options.classProperties) !== null && _a !== void 0 ? _a : { loose: true };
14
+ return {
15
+ presets: [
16
+ // Support module/nomodule pattern.
17
+ [
18
+ require.resolve('@babel/preset-env'),
19
+ // For Jest tests, NODE_ENV is set as 'test' and we only want to set target as Node.
20
+ // All other options will fail in Jest since Node does not support some ES features
21
+ // such as import syntax.
22
+ process.env.NODE_ENV === 'test'
23
+ ? { targets: { node: 'current' }, loose: true }
24
+ : {
25
+ // Allow importing core-js in entrypoint and use browserslist to select polyfills.
26
+ useBuiltIns: (_b = options.useBuiltIns) !== null && _b !== void 0 ? _b : 'entry',
27
+ corejs: 3,
28
+ // Do not transform modules to CJS
29
+ modules: false,
30
+ targets: isModern ? { esmodules: 'intersect' } : undefined,
31
+ bugfixes: true,
32
+ // Exclude transforms that make all code slower
33
+ exclude: ['transform-typeof-symbol'],
34
+ // This must match the setting for `@babel/plugin-proposal-class-properties`
35
+ loose: classProperties.loose,
36
+ },
37
+ ],
38
+ [
39
+ require.resolve('@babel/preset-typescript'),
40
+ {
41
+ allowDeclareFields: true,
42
+ },
43
+ ],
44
+ ],
45
+ plugins: [
46
+ !isNxPackage
47
+ ? [
48
+ require.resolve('@babel/plugin-transform-runtime'),
49
+ {
50
+ corejs: false,
51
+ helpers: true,
52
+ regenerator: true,
53
+ useESModules: isModern,
54
+ absoluteRuntime: (0, path_1.dirname)(require.resolve('@babel/runtime/package.json')),
55
+ },
56
+ ]
57
+ : null,
58
+ require.resolve('babel-plugin-macros'),
59
+ emitDecoratorMetadata
60
+ ? require.resolve('babel-plugin-transform-typescript-metadata')
61
+ : undefined,
62
+ // Must use legacy decorators to remain compatible with TypeScript.
63
+ [
64
+ require.resolve('@babel/plugin-proposal-decorators'),
65
+ (_c = options.decorators) !== null && _c !== void 0 ? _c : { legacy: true },
66
+ ],
67
+ [
68
+ require.resolve('@babel/plugin-proposal-class-properties'),
69
+ classProperties,
70
+ ],
71
+ ].filter(Boolean),
72
+ overrides: [
73
+ // Convert `const enum` to `enum`. The former cannot be supported by babel
74
+ // but at least we can get it to not error out.
75
+ {
76
+ test: /\.tsx?$/,
77
+ plugins: [
78
+ [
79
+ require.resolve('babel-plugin-const-enum'),
80
+ {
81
+ transform: 'removeConst',
82
+ },
83
+ ],
84
+ ],
85
+ },
86
+ ],
87
+ };
88
+ };
89
+ //# sourceMappingURL=babel.js.map
package/babel.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel.js","sourceRoot":"","sources":["../../../packages/js/babel.ts"],"names":[],"mappings":"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"}
package/executors.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "http://json-schema.org/schema",
3
+ "executors": {
4
+ "tsc": {
5
+ "implementation": "./src/executors/tsc/tsc.impl",
6
+ "schema": "./src/executors/tsc/schema.json",
7
+ "description": "Build a project using TypeScript."
8
+ },
9
+ "swc": {
10
+ "implementation": "./src/executors/swc/swc.impl",
11
+ "schema": "./src/executors/swc/schema.json",
12
+ "description": "Build a project using SWC."
13
+ },
14
+ "node": {
15
+ "implementation": "./src/executors/node/node.impl",
16
+ "schema": "./src/executors/node/schema.json",
17
+ "description": "Execute a Node application."
18
+ }
19
+ },
20
+ "builders": {
21
+ "tsc": {
22
+ "implementation": "./src/executors/tsc/compat",
23
+ "schema": "./src/executors/tsc/schema.json",
24
+ "description": "Build a project using TypeScript."
25
+ },
26
+ "swc": {
27
+ "implementation": "./src/executors/swc/compat",
28
+ "schema": "./src/executors/swc/schema.json",
29
+ "description": "Build a project using SWC."
30
+ },
31
+ "node": {
32
+ "implementation": "./src/executors/node/compat",
33
+ "schema": "./src/executors/node/schema.json",
34
+ "description": "Execute a Node application."
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "nx/js",
3
+ "version": "0.1",
4
+ "schematics": {
5
+ "library": {
6
+ "factory": "./src/generators/library/library#librarySchematic",
7
+ "schema": "./src/generators/library/schema.json",
8
+ "aliases": ["lib"],
9
+ "x-type": "library",
10
+ "description": "Create a library."
11
+ },
12
+ "init": {
13
+ "factory": "./src/generators/init/init#initSchematic",
14
+ "schema": "./src/generators/init/schema.json",
15
+ "aliases": ["lib"],
16
+ "x-type": "init",
17
+ "description": "Initialize a TS/JS workspace.",
18
+ "hidden": true
19
+ },
20
+ "convert-to-swc": {
21
+ "factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcSchematic",
22
+ "schema": "./src/generators/convert-to-swc/schema.json",
23
+ "aliases": ["swc"],
24
+ "x-type": "library",
25
+ "description": "Convert a TypeScript library to compile with SWC."
26
+ }
27
+ },
28
+ "generators": {
29
+ "library": {
30
+ "factory": "./src/generators/library/library#libraryGenerator",
31
+ "schema": "./src/generators/library/schema.json",
32
+ "aliases": ["lib"],
33
+ "x-type": "library",
34
+ "description": "Create a library"
35
+ },
36
+ "init": {
37
+ "factory": "./src/generators/init/init#initGenerator",
38
+ "schema": "./src/generators/init/schema.json",
39
+ "aliases": ["lib"],
40
+ "x-type": "init",
41
+ "description": "Initialize a TS/JS workspace.",
42
+ "hidden": true
43
+ },
44
+ "convert-to-swc": {
45
+ "factory": "./src/generators/convert-to-swc/convert-to-swc#convertToSwcGenerator",
46
+ "schema": "./src/generators/convert-to-swc/schema.json",
47
+ "aliases": ["swc"],
48
+ "x-type": "library",
49
+ "description": "Convert a TypeScript library to compile with SWC."
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "generators": {
3
+ "update-node-executor": {
4
+ "cli": "nx",
5
+ "version": "13.8.5-beta.1",
6
+ "description": "Renames @nrwl/js:node to @nrwl/node:node",
7
+ "factory": "./src/migrations/update-13-8-5/update-node-executor"
8
+ },
9
+ "update-swcrc": {
10
+ "cli": "nx",
11
+ "version": "13.8.5-beta.1",
12
+ "description": "Adjust .swcrc to .lib.swcrc",
13
+ "factory": "./src/migrations/update-13-8-5/update-swcrc"
14
+ },
15
+ "update-swcrc-exclude": {
16
+ "cli": "nx",
17
+ "version": "13.10.1-beta.1",
18
+ "description": "Update .lib.swcrc to exclude missing test files",
19
+ "factory": "./src/migrations/update-13-10-1/update-lib-swcrc-exclude"
20
+ },
21
+ "exclude-jest-config-swcrc": {
22
+ "cli": "nx",
23
+ "version": "14.0.0-beta.2",
24
+ "description": "Exclude jest config from .lib.swcrc",
25
+ "factory": "./src/migrations/update-14-0-0/exclude-jest-config-swcrc"
26
+ },
27
+ "update-swcrc-path": {
28
+ "cli": "nx",
29
+ "version": "14.1.5-beta.0",
30
+ "description": "Rename option swcrcPath to swcrc, and resolve relative to workspace root",
31
+ "factory": "./src/migrations/update-14-1-5/update-swcrc-path"
32
+ },
33
+ "rename-swcrc-config": {
34
+ "cli": "nx",
35
+ "version": "15.8.0-beta.0",
36
+ "description": "Rename .lib.swcrc to .swcrc for better SWC support throughout the workspace",
37
+ "factory": "./src/migrations/update-15-8-0/rename-swcrc-config"
38
+ },
39
+ "update-16-0-0-add-nx-packages": {
40
+ "cli": "nx",
41
+ "version": "16.0.0-beta.1",
42
+ "description": "Replace @nrwl/js with @nx/js",
43
+ "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
44
+ }
45
+ },
46
+ "packageJsonUpdates": {
47
+ "15.8.0": {
48
+ "version": "15.8.0-beta.2",
49
+ "x-prompt": "Do you want to update to TypeScript v4.9?",
50
+ "requires": {
51
+ "typescript": ">=4.8.2 <4.9.0"
52
+ },
53
+ "packages": {
54
+ "typescript": {
55
+ "version": "~4.9.5"
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
package/package.json ADDED
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "@nx/js",
3
+ "version": "16.0.0-beta.1",
4
+ "private": false,
5
+ "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/nrwl/nx.git",
9
+ "directory": "packages/js"
10
+ },
11
+ "keywords": [
12
+ "Monorepo",
13
+ "Web",
14
+ "Node",
15
+ "Swc",
16
+ "Tsc",
17
+ "CLI"
18
+ ],
19
+ "main": "src/index.js",
20
+ "typings": "src/index.d.ts",
21
+ "license": "MIT",
22
+ "bugs": {
23
+ "url": "https://github.com/nrwl/nx/issues"
24
+ },
25
+ "homepage": "https://nx.dev",
26
+ "ng-update": {
27
+ "requirements": {},
28
+ "migrations": "./migrations.json"
29
+ },
30
+ "generators": "./generators.json",
31
+ "schematics": "./generators.json",
32
+ "executors": "./executors.json",
33
+ "builders": "./executors.json",
34
+ "dependencies": {
35
+ "@babel/core": "^7.15.0",
36
+ "@babel/plugin-proposal-class-properties": "^7.14.5",
37
+ "@babel/plugin-proposal-decorators": "^7.14.5",
38
+ "@babel/plugin-transform-runtime": "^7.15.0",
39
+ "@babel/preset-env": "^7.15.0",
40
+ "@babel/preset-typescript": "^7.15.0",
41
+ "@babel/runtime": "^7.14.8",
42
+ "@nrwl/js": "16.0.0-beta.1",
43
+ "@nx/devkit": "16.0.0-beta.1",
44
+ "@nx/workspace": "16.0.0-beta.1",
45
+ "@phenomnomnominal/tsquery": "~5.0.1",
46
+ "babel-plugin-const-enum": "^1.0.1",
47
+ "babel-plugin-macros": "^2.8.0",
48
+ "babel-plugin-transform-typescript-metadata": "^0.3.1",
49
+ "chalk": "^4.1.0",
50
+ "fast-glob": "3.2.7",
51
+ "fs-extra": "^11.1.0",
52
+ "ignore": "^5.0.4",
53
+ "js-tokens": "^4.0.0",
54
+ "minimatch": "3.0.5",
55
+ "source-map-support": "0.5.19",
56
+ "tree-kill": "1.2.2",
57
+ "tslib": "^2.3.0"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ },
62
+ "types": "./src/index.d.ts",
63
+ "gitHead": "abf534c265f5aa3aac146e55bb31de598ea281d7"
64
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const node_impl_1 = require("./node.impl");
5
+ exports.default = (0, devkit_1.convertNxExecutor)(node_impl_1.default);
6
+ //# sourceMappingURL=compat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/node/compat.ts"],"names":[],"mappings":";;AAAA,uCAA+C;AAC/C,2CAAuC;AAEvC,kBAAe,IAAA,0BAAiB,EAAC,mBAAY,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ declare const Module: any;
2
+ declare const originalLoader: any;
3
+ declare const mappings: any;
4
+ declare const keys: string[];
5
+ declare const fileToRun: string;
@@ -0,0 +1,20 @@
1
+ const Module = require('module');
2
+ const originalLoader = Module._load;
3
+ const mappings = JSON.parse(process.env.NX_MAPPINGS);
4
+ const keys = Object.keys(mappings);
5
+ const fileToRun = process.env.NX_FILE_TO_RUN;
6
+ Module._load = function (request, parent) {
7
+ if (!parent)
8
+ return originalLoader.apply(this, arguments);
9
+ const match = keys.find((k) => request === k);
10
+ if (match) {
11
+ const newArguments = [...arguments];
12
+ newArguments[0] = mappings[match];
13
+ return originalLoader.apply(this, newArguments);
14
+ }
15
+ else {
16
+ return originalLoader.apply(this, arguments);
17
+ }
18
+ };
19
+ require(fileToRun);
20
+ //# sourceMappingURL=node-with-require-overrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-with-require-overrides.js","sourceRoot":"","sources":["../../../../../../packages/js/src/executors/node/node-with-require-overrides.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;AAEpC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACrD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACnC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;AAE7C,MAAM,CAAC,KAAK,GAAG,UAAU,OAAO,EAAE,MAAM;IACtC,IAAI,CAAC,MAAM;QAAE,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC;IAC9C,IAAI,KAAK,EAAE;QACT,MAAM,YAAY,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;QACpC,YAAY,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;KACjD;SAAM;QACL,OAAO,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;KAC9C;AACH,CAAC,CAAC;AAEF,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ExecutorContext } from '@nx/devkit';
2
+ import { NodeExecutorOptions } from './schema';
3
+ export interface ExecutorEvent {
4
+ outfile: string;
5
+ success: boolean;
6
+ }
7
+ export declare function nodeExecutor(options: NodeExecutorOptions, context: ExecutorContext): AsyncGenerator<ExecutorEvent, void, unknown>;
8
+ export default nodeExecutor;
@@ -0,0 +1,184 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nodeExecutor = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const devkit_1 = require("@nx/devkit");
6
+ const buildable_libs_utils_1 = require("../../utils/buildable-libs-utils");
7
+ const child_process_1 = require("child_process");
8
+ const crypto_1 = require("crypto");
9
+ const hashing_impl_1 = require("nx/src/hasher/hashing-impl");
10
+ const treeKill = require("tree-kill");
11
+ const util_1 = require("util");
12
+ const hasher = new hashing_impl_1.HashingImpl();
13
+ const processMap = new Map();
14
+ const hashedMap = new Map();
15
+ function nodeExecutor(options, context) {
16
+ return tslib_1.__asyncGenerator(this, arguments, function* nodeExecutor_1() {
17
+ var _a, e_1, _b, _c;
18
+ const uniqueKey = (0, crypto_1.randomUUID)();
19
+ process.on('SIGTERM', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
20
+ yield killCurrentProcess(uniqueKey, options, 'SIGTERM');
21
+ process.exit(128 + 15);
22
+ }));
23
+ process.on('SIGINT', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ yield killCurrentProcess(uniqueKey, options, 'SIGINT');
25
+ process.exit(128 + 2);
26
+ }));
27
+ process.on('SIGHUP', () => tslib_1.__awaiter(this, void 0, void 0, function* () {
28
+ yield killCurrentProcess(uniqueKey, options, 'SIGHUP');
29
+ process.exit(128 + 1);
30
+ }));
31
+ if (options.waitUntilTargets && options.waitUntilTargets.length > 0) {
32
+ const results = yield tslib_1.__await(runWaitUntilTargets(options, context));
33
+ for (const [i, result] of results.entries()) {
34
+ if (!result.success) {
35
+ throw new Error(`Wait until target failed: ${options.waitUntilTargets[i]}.`);
36
+ }
37
+ }
38
+ }
39
+ const mappings = calculateResolveMappings(context, options);
40
+ try {
41
+ for (var _d = true, _e = tslib_1.__asyncValues(startBuild(options, context)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a;) {
42
+ _c = _f.value;
43
+ _d = false;
44
+ try {
45
+ const event = _c;
46
+ if (!event.success) {
47
+ devkit_1.logger.error('There was an error with the build. See above.');
48
+ devkit_1.logger.info(`${event.outfile} was not restarted.`);
49
+ }
50
+ yield tslib_1.__await(handleBuildEvent(uniqueKey, event, options, mappings));
51
+ yield yield tslib_1.__await(event);
52
+ }
53
+ finally {
54
+ _d = true;
55
+ }
56
+ }
57
+ }
58
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
59
+ finally {
60
+ try {
61
+ if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
62
+ }
63
+ finally { if (e_1) throw e_1.error; }
64
+ }
65
+ });
66
+ }
67
+ exports.nodeExecutor = nodeExecutor;
68
+ function calculateResolveMappings(context, options) {
69
+ const parsed = (0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph);
70
+ const { dependencies } = (0, buildable_libs_utils_1.calculateProjectDependencies)(context.projectGraph, context.root, parsed.project, parsed.target, parsed.configuration);
71
+ return dependencies.reduce((m, c) => {
72
+ if (c.node.type !== 'npm' && c.outputs[0] != null) {
73
+ m[c.name] = (0, devkit_1.joinPathFragments)(context.root, c.outputs[0]);
74
+ }
75
+ return m;
76
+ }, {});
77
+ }
78
+ function runProcess(uniqueKey, event, options, mappings) {
79
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
80
+ const execArgv = getExecArgv(options);
81
+ const hashedKey = JSON.stringify([uniqueKey, ...options.args]);
82
+ const hashed = hasher.hashArray(execArgv.concat(hashedKey));
83
+ hashedMap.set(hashedKey, hashed);
84
+ const subProcess = (0, child_process_1.fork)((0, devkit_1.joinPathFragments)(__dirname, 'node-with-require-overrides'), options.args, {
85
+ execArgv,
86
+ stdio: 'inherit',
87
+ env: Object.assign(Object.assign({}, process.env), { NX_FILE_TO_RUN: event.outfile, NX_MAPPINGS: JSON.stringify(mappings) }),
88
+ });
89
+ processMap.set(hashed, subProcess);
90
+ if (!options.watch) {
91
+ return new Promise((resolve, reject) => {
92
+ subProcess.on('exit', (code) => {
93
+ if (code === 0) {
94
+ resolve(undefined);
95
+ }
96
+ else {
97
+ reject();
98
+ }
99
+ });
100
+ });
101
+ }
102
+ });
103
+ }
104
+ function getExecArgv(options) {
105
+ const args = [
106
+ '-r',
107
+ require.resolve('source-map-support/register'),
108
+ ...options.runtimeArgs,
109
+ ];
110
+ if (options.inspect === true) {
111
+ options.inspect = "inspect" /* InspectType.Inspect */;
112
+ }
113
+ if (options.inspect) {
114
+ args.push(`--${options.inspect}=${options.host}:${options.port}`);
115
+ }
116
+ return args;
117
+ }
118
+ function handleBuildEvent(uniqueKey, event, options, mappings) {
119
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
120
+ // Don't kill previous run unless new build is successful.
121
+ if (options.watch && event.success) {
122
+ yield killCurrentProcess(uniqueKey, options);
123
+ }
124
+ if (event.success) {
125
+ yield runProcess(uniqueKey, event, options, mappings);
126
+ }
127
+ });
128
+ }
129
+ const promisifiedTreeKill = (0, util_1.promisify)(treeKill);
130
+ function killCurrentProcess(uniqueKey, options, signal = 'SIGTERM') {
131
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
132
+ const hashedKey = JSON.stringify([uniqueKey, ...options.args]);
133
+ const currentProcessKey = hashedMap.get(hashedKey);
134
+ if (!currentProcessKey)
135
+ return;
136
+ const currentProcess = processMap.get(currentProcessKey);
137
+ if (!currentProcess)
138
+ return;
139
+ try {
140
+ yield promisifiedTreeKill(currentProcess.pid, signal);
141
+ // if the currentProcess.killed is false, invoke kill()
142
+ // to properly send the signal to the process
143
+ if (!currentProcess.killed) {
144
+ currentProcess.kill(signal);
145
+ }
146
+ }
147
+ catch (err) {
148
+ if (Array.isArray(err) && err[0] && err[2]) {
149
+ const errorMessage = err[2];
150
+ devkit_1.logger.error(errorMessage);
151
+ }
152
+ else if (err.message) {
153
+ devkit_1.logger.error(err.message);
154
+ }
155
+ }
156
+ finally {
157
+ processMap.delete(currentProcessKey);
158
+ hashedMap.delete(hashedKey);
159
+ }
160
+ });
161
+ }
162
+ function startBuild(options, context) {
163
+ return tslib_1.__asyncGenerator(this, arguments, function* startBuild_1() {
164
+ const buildTarget = (0, devkit_1.parseTargetString)(options.buildTarget, context.projectGraph);
165
+ yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(yield tslib_1.__await((0, devkit_1.runExecutor)(buildTarget, Object.assign(Object.assign({}, options.buildTargetOptions), { watch: options.watch }), context)))));
166
+ });
167
+ }
168
+ function runWaitUntilTargets(options, context) {
169
+ return Promise.all(options.waitUntilTargets.map((waitUntilTarget) => tslib_1.__awaiter(this, void 0, void 0, function* () {
170
+ const target = (0, devkit_1.parseTargetString)(waitUntilTarget, context.projectGraph);
171
+ const output = yield (0, devkit_1.runExecutor)(target, {}, context);
172
+ return new Promise((resolve) => tslib_1.__awaiter(this, void 0, void 0, function* () {
173
+ let event = yield output.next();
174
+ // Resolve after first event
175
+ resolve(event.value);
176
+ // Continue iterating
177
+ while (!event.done) {
178
+ event = yield output.next();
179
+ }
180
+ }));
181
+ })));
182
+ }
183
+ exports.default = nodeExecutor;
184
+ //# sourceMappingURL=node.impl.js.map