@nx/js 20.5.0-beta.0 → 20.5.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "20.5.0-beta.0",
3
+ "version": "20.5.0-beta.1",
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": {
@@ -39,8 +39,8 @@
39
39
  "@babel/preset-env": "^7.23.2",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nx/devkit": "20.5.0-beta.0",
43
- "@nx/workspace": "20.5.0-beta.0",
42
+ "@nx/devkit": "20.5.0-beta.1",
43
+ "@nx/workspace": "20.5.0-beta.1",
44
44
  "@zkochan/js-yaml": "0.0.7",
45
45
  "babel-plugin-const-enum": "^1.0.1",
46
46
  "babel-plugin-macros": "^3.1.0",
@@ -63,6 +63,7 @@ async function libraryGeneratorInternal(tree, schema) {
63
63
  project: options.name,
64
64
  compiler: 'swc',
65
65
  format: options.isUsingTsSolutionConfig ? ['esm'] : ['cjs', 'esm'],
66
+ skipFormat: true,
66
67
  });
67
68
  }
68
69
  if (options.bundler === 'vite') {
@@ -9,6 +9,7 @@ export interface TscPluginOptions {
9
9
  buildDepsName?: string;
10
10
  watchDepsName?: string;
11
11
  };
12
+ verboseOutput?: boolean;
12
13
  }
13
14
  /**
14
15
  * @deprecated The 'createDependencies' function is now a no-op. This functionality is included in 'createNodesV2'.
@@ -126,11 +126,6 @@ function buildTscTargets(configFilePath, projectRoot, options, context) {
126
126
  const targets = {};
127
127
  const namedInputs = (0, get_named_inputs_1.getNamedInputs)(projectRoot, context);
128
128
  const tsConfig = readCachedTsConfig(configFilePath);
129
- // TODO: check whether we want to always run with --pretty --verbose, it makes replacing scripts harder
130
- // `--verbose` conflicts with `tsc -b --clean`, might be another reason for not using it, it would
131
- // prevent users from running the task with `--clean` flag.
132
- // Should we consider creating a different optional target for `--clean`?
133
- // Should we consider having a plugin option to disable `--pretty` and `--verbose`?
134
129
  let internalProjectReferences;
135
130
  // Typecheck target
136
131
  if ((0, node_path_1.basename)(configFilePath) === 'tsconfig.json' && options.typecheck) {
@@ -138,7 +133,7 @@ function buildTscTargets(configFilePath, projectRoot, options, context) {
138
133
  const externalProjectReferences = resolveShallowExternalProjectReferences(tsConfig, context.workspaceRoot, projectRoot);
139
134
  const targetName = options.typecheck.targetName;
140
135
  if (!targets[targetName]) {
141
- let command = `tsc --build --emitDeclarationOnly --pretty --verbose`;
136
+ let command = `tsc --build --emitDeclarationOnly${options.verboseOutput ? ' --verbose' : ''}`;
142
137
  if (tsConfig.options.noEmit ||
143
138
  Object.values(internalProjectReferences).some((ref) => ref.options.noEmit) ||
144
139
  Object.values(externalProjectReferences).some((ref) => ref.options.noEmit)) {
@@ -174,7 +169,7 @@ function buildTscTargets(configFilePath, projectRoot, options, context) {
174
169
  const targetName = options.build.targetName;
175
170
  targets[targetName] = {
176
171
  dependsOn: [`^${targetName}`],
177
- command: `tsc --build ${options.build.configName} --pretty --verbose`,
172
+ command: `tsc --build ${options.build.configName}${options.verboseOutput ? ' --verbose' : ''}`,
178
173
  options: { cwd: projectRoot },
179
174
  cache: true,
180
175
  inputs: getInputs(namedInputs, configFilePath, tsConfig, internalProjectReferences, context.workspaceRoot, projectRoot),
@@ -584,6 +579,7 @@ function normalizePluginOptions(pluginOptions = {}) {
584
579
  return {
585
580
  typecheck,
586
581
  build,
582
+ verboseOutput: pluginOptions.verboseOutput ?? false,
587
583
  };
588
584
  }
589
585
  function resolveExtendedTsConfigPath(tsConfigPath, directory) {