@nx/js 19.0.3 → 19.1.0-beta.0

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/babel.js CHANGED
@@ -27,7 +27,7 @@ module.exports = function (api, options = {}) {
27
27
  // All other options will fail in Jest since Node does not support some ES features
28
28
  // such as import syntax.
29
29
  isTest || process.env.NODE_ENV === 'test' || process.env.JEST_WORKER_ID
30
- ? { targets: { node: 'current' }, loose: true }
30
+ ? { targets: { node: 'current' }, loose }
31
31
  : createBabelPresetEnvOptions(options.useBuiltIns, isModern, loose),
32
32
  ],
33
33
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "19.0.3",
3
+ "version": "19.1.0-beta.0",
4
4
  "private": false,
5
5
  "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
6
6
  "repository": {
@@ -56,9 +56,9 @@
56
56
  "semver": "^7.5.3",
57
57
  "source-map-support": "0.5.19",
58
58
  "tslib": "^2.3.0",
59
- "@nx/devkit": "19.0.3",
60
- "@nx/workspace": "19.0.3",
61
- "@nrwl/js": "19.0.3"
59
+ "@nx/devkit": "19.1.0-beta.0",
60
+ "@nx/workspace": "19.1.0-beta.0",
61
+ "@nrwl/js": "19.1.0-beta.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "verdaccio": "^5.0.4"
@@ -3,10 +3,12 @@
3
3
  * @param localRegistryTarget the target to run to start the local registry e.g. workspace:local-registry
4
4
  * @param storage the storage location for the local registry
5
5
  * @param verbose whether to log verbose output
6
+ * @param clearStorage whether to clear the verdaccio storage before running the registry
6
7
  */
7
- export declare function startLocalRegistry({ localRegistryTarget, storage, verbose, }: {
8
+ export declare function startLocalRegistry({ localRegistryTarget, storage, verbose, clearStorage, }: {
8
9
  localRegistryTarget: string;
9
10
  storage?: string;
10
11
  verbose?: boolean;
12
+ clearStorage?: boolean;
11
13
  }): Promise<() => void>;
12
14
  export default startLocalRegistry;
@@ -7,14 +7,15 @@ const child_process_1 = require("child_process");
7
7
  * @param localRegistryTarget the target to run to start the local registry e.g. workspace:local-registry
8
8
  * @param storage the storage location for the local registry
9
9
  * @param verbose whether to log verbose output
10
+ * @param clearStorage whether to clear the verdaccio storage before running the registry
10
11
  */
11
- function startLocalRegistry({ localRegistryTarget, storage, verbose, }) {
12
+ function startLocalRegistry({ localRegistryTarget, storage, verbose, clearStorage, }) {
12
13
  if (!localRegistryTarget) {
13
14
  throw new Error(`localRegistryTarget is required`);
14
15
  }
15
16
  return new Promise((resolve, reject) => {
16
17
  const childProcess = (0, child_process_1.fork)(require.resolve('nx'), [
17
- ...`run ${localRegistryTarget} --location none --clear true`.split(' '),
18
+ ...`run ${localRegistryTarget} --location none --clear ${clearStorage ?? true}`.split(' '),
18
19
  ...(storage ? [`--storage`, storage] : []),
19
20
  ], { stdio: 'pipe' });
20
21
  const listener = (data) => {
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CopyAssetsHandler = exports.defaultFileEventHandler = void 0;
4
4
  const minimatch_1 = require("minimatch");
5
- const path = require("node:path/posix");
5
+ const pathPosix = require("node:path/posix");
6
+ const path = require("node:path");
6
7
  const fse = require("fs-extra");
7
8
  const ignore_1 = require("ignore");
8
9
  const fg = require("fast-glob");
@@ -34,8 +35,8 @@ class CopyAssetsHandler {
34
35
  this.callback = opts.callback ?? exports.defaultFileEventHandler;
35
36
  // TODO(jack): Should handle nested .gitignore files
36
37
  this.ignore = (0, ignore_1.default)();
37
- const gitignore = path.join(opts.rootDir, '.gitignore');
38
- const nxignore = path.join(opts.rootDir, '.nxignore');
38
+ const gitignore = pathPosix.join(opts.rootDir, '.gitignore');
39
+ const nxignore = pathPosix.join(opts.rootDir, '.nxignore');
39
40
  if (fse.existsSync(gitignore))
40
41
  this.ignore.add(fse.readFileSync(gitignore).toString());
41
42
  if (fse.existsSync(nxignore))
@@ -54,11 +55,11 @@ class CopyAssetsHandler {
54
55
  }
55
56
  else {
56
57
  isGlob = true;
57
- pattern = path.join(f.input, f.glob);
58
+ pattern = pathPosix.join(f.input, f.glob);
58
59
  input = f.input;
59
- output = path.join(path.relative(opts.rootDir, opts.outputDir), f.output);
60
+ output = pathPosix.join(path.relative(opts.rootDir, opts.outputDir), f.output);
60
61
  if (f.ignore)
61
- ignore = f.ignore.map((ig) => path.join(f.input, ig));
62
+ ignore = f.ignore.map((ig) => pathPosix.join(f.input, ig));
62
63
  }
63
64
  return {
64
65
  isGlob,