@nx/js 16.9.0-rc.0 → 16.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "16.9.0-rc.0",
3
+ "version": "16.9.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": {
@@ -59,8 +59,8 @@
59
59
  "semver": "7.5.3",
60
60
  "source-map-support": "0.5.19",
61
61
  "tslib": "^2.3.0",
62
- "@nx/devkit": "16.9.0-rc.0",
63
- "@nx/workspace": "16.9.0-rc.0",
62
+ "@nx/devkit": "16.9.0",
63
+ "@nx/workspace": "16.9.0",
64
64
  "@nrwl/js": "*"
65
65
  },
66
66
  "peerDependencies": {
@@ -19,6 +19,19 @@ function processEnv(color) {
19
19
  async function runExecutor(options, context) {
20
20
  const projectConfig = context.projectsConfigurations.projects[context.projectName];
21
21
  const packageRoot = (0, devkit_1.joinPathFragments)(context.root, options.packageRoot ?? projectConfig.root);
22
+ const packageJsonPath = (0, devkit_1.joinPathFragments)(packageRoot, 'package.json');
23
+ const projectPackageJson = (0, devkit_1.readJsonFile)(packageJsonPath);
24
+ const name = projectPackageJson.name;
25
+ // If package and project name match, we can make log messages terser
26
+ let packageTxt = name === context.projectName
27
+ ? `package "${name}"`
28
+ : `package "${name}" from project "${context.projectName}"`;
29
+ if (projectPackageJson.private === true) {
30
+ console.warn(`Skipping ${packageTxt}, because it has \`"private": true\` in ${packageJsonPath}`);
31
+ return {
32
+ success: true,
33
+ };
34
+ }
22
35
  const npmPublishCommandSegments = [`npm publish --json`];
23
36
  if (options.registry) {
24
37
  npmPublishCommandSegments.push(`--registry=${options.registry}`);
@@ -55,17 +68,11 @@ async function runExecutor(options, context) {
55
68
  }
56
69
  catch (err) {
57
70
  try {
58
- const projectPackageJson = (0, devkit_1.readJsonFile)((0, devkit_1.joinPathFragments)(packageRoot, 'package.json'));
59
- const name = projectPackageJson.name;
60
71
  const currentVersion = projectPackageJson.version;
61
72
  const stdoutData = JSON.parse(err.stdout?.toString() || '{}');
62
73
  if (stdoutData.error?.code === 'EPUBLISHCONFLICT' ||
63
74
  (stdoutData.error?.code === 'E403' &&
64
75
  stdoutData.error?.body?.error?.includes('You cannot publish over the previously published versions'))) {
65
- // If package and project name match, make it terser
66
- let packageTxt = name === context.projectName
67
- ? `package "${name}"`
68
- : `package "${name}" from project "${context.projectName}"`;
69
76
  console.warn(`Skipping ${packageTxt}, as v${currentVersion} has already been published to ${registry} with tag "${tag}"`);
70
77
  return {
71
78
  success: true,