nx 20.5.0-rc.0 → 20.5.0-rc.2

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",
3
- "version": "20.5.0-rc.0",
3
+ "version": "20.5.0-rc.2",
4
4
  "private": false,
5
5
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
6
6
  "repository": {
@@ -82,16 +82,16 @@
82
82
  }
83
83
  },
84
84
  "optionalDependencies": {
85
- "@nx/nx-darwin-arm64": "20.5.0-rc.0",
86
- "@nx/nx-darwin-x64": "20.5.0-rc.0",
87
- "@nx/nx-freebsd-x64": "20.5.0-rc.0",
88
- "@nx/nx-linux-arm-gnueabihf": "20.5.0-rc.0",
89
- "@nx/nx-linux-arm64-gnu": "20.5.0-rc.0",
90
- "@nx/nx-linux-arm64-musl": "20.5.0-rc.0",
91
- "@nx/nx-linux-x64-gnu": "20.5.0-rc.0",
92
- "@nx/nx-linux-x64-musl": "20.5.0-rc.0",
93
- "@nx/nx-win32-arm64-msvc": "20.5.0-rc.0",
94
- "@nx/nx-win32-x64-msvc": "20.5.0-rc.0"
85
+ "@nx/nx-darwin-arm64": "20.5.0-rc.2",
86
+ "@nx/nx-darwin-x64": "20.5.0-rc.2",
87
+ "@nx/nx-freebsd-x64": "20.5.0-rc.2",
88
+ "@nx/nx-linux-arm-gnueabihf": "20.5.0-rc.2",
89
+ "@nx/nx-linux-arm64-gnu": "20.5.0-rc.2",
90
+ "@nx/nx-linux-arm64-musl": "20.5.0-rc.2",
91
+ "@nx/nx-linux-x64-gnu": "20.5.0-rc.2",
92
+ "@nx/nx-linux-x64-musl": "20.5.0-rc.2",
93
+ "@nx/nx-win32-arm64-msvc": "20.5.0-rc.2",
94
+ "@nx/nx-win32-x64-msvc": "20.5.0-rc.2"
95
95
  },
96
96
  "nx-migrations": {
97
97
  "migrations": "./migrations.json",
@@ -143,10 +143,6 @@ exports.examples = {
143
143
  command: 'graph --focus=todos-feature-main',
144
144
  description: 'Show the graph where every node is either an ancestor or a descendant of todos-feature-main',
145
145
  },
146
- {
147
- command: 'graph --include=project-one,project-two',
148
- description: 'Include project-one and project-two in the project graph',
149
- },
150
146
  {
151
147
  command: 'graph --exclude=project-one,project-two',
152
148
  description: 'Exclude project-one and project-two from the project graph',
@@ -65,9 +65,27 @@ async function reportHandler() {
65
65
  bodyLines.push('');
66
66
  bodyLines.push(LINE_SEPARATOR);
67
67
  bodyLines.push(chalk.green('Nx Powerpack'));
68
+ const licenseExpiryDate = new Date((powerpackLicense.realExpiresAt ?? powerpackLicense.expiresAt) * 1000);
68
69
  bodyLines.push(`Licensed to ${powerpackLicense.organizationName} for ${powerpackLicense.seatCount} user${powerpackLicense.seatCount > 1 ? 's' : ''} in ${powerpackLicense.workspaceCount === 9999
69
70
  ? 'an unlimited number of'
70
- : powerpackLicense.workspaceCount} workspace${powerpackLicense.workspaceCount > 1 ? 's' : ''} until ${new Date((powerpackLicense.realExpiresAt ?? powerpackLicense.expiresAt) * 1000).toLocaleDateString()}`);
71
+ : powerpackLicense.workspaceCount} workspace${powerpackLicense.workspaceCount > 1 ? 's' : ''}.`);
72
+ // license is not expired
73
+ if (licenseExpiryDate.getTime() >= Date.now()) {
74
+ if ('perpetualNxVersion' in powerpackLicense) {
75
+ bodyLines.push(`License expires on ${licenseExpiryDate.toLocaleDateString()}, but will continue to work with Nx ${powerpackLicense.perpetualNxVersion} and below.`);
76
+ }
77
+ else {
78
+ bodyLines.push(`License expires on ${licenseExpiryDate.toLocaleDateString()}.`);
79
+ }
80
+ }
81
+ else {
82
+ if ('perpetualNxVersion' in powerpackLicense) {
83
+ bodyLines.push(`License expired on ${licenseExpiryDate.toLocaleDateString()}, but will continue to work with Nx ${powerpackLicense.perpetualNxVersion} and below.`);
84
+ }
85
+ else {
86
+ bodyLines.push(`License expired on ${licenseExpiryDate.toLocaleDateString()}.`);
87
+ }
88
+ }
71
89
  bodyLines.push('');
72
90
  padding =
73
91
  Math.max(...powerpackPlugins.map((powerpackPlugin) => powerpackPlugin.name.length)) + 1;
@@ -74,6 +74,7 @@ export interface ProjectGraphProjectNode {
74
74
  description?: string;
75
75
  };
76
76
  }
77
+ export declare function isProjectGraphProjectNode(node: ProjectGraphProjectNode | ProjectGraphExternalNode): node is ProjectGraphProjectNode;
77
78
  /**
78
79
  * A node describing an external dependency
79
80
  * `name` has as form of:
@@ -85,14 +86,15 @@ export interface ProjectGraphProjectNode {
85
86
  *
86
87
  */
87
88
  export interface ProjectGraphExternalNode {
88
- type: 'npm';
89
- name: `npm:${string}`;
89
+ type: string;
90
+ name: string;
90
91
  data: {
91
92
  version: string;
92
93
  packageName: string;
93
94
  hash?: string;
94
95
  };
95
96
  }
97
+ export declare function isProjectGraphExternalNode(node: ProjectGraphProjectNode | ProjectGraphExternalNode): node is ProjectGraphExternalNode;
96
98
  /**
97
99
  * A dependency between two projects
98
100
  */
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DependencyType = void 0;
4
4
  exports.fileDataDepTarget = fileDataDepTarget;
5
5
  exports.fileDataDepType = fileDataDepType;
6
+ exports.isProjectGraphProjectNode = isProjectGraphProjectNode;
7
+ exports.isProjectGraphExternalNode = isProjectGraphExternalNode;
6
8
  function fileDataDepTarget(dep) {
7
9
  return typeof dep === 'string'
8
10
  ? dep
@@ -35,3 +37,9 @@ var DependencyType;
35
37
  */
36
38
  DependencyType["implicit"] = "implicit";
37
39
  })(DependencyType || (exports.DependencyType = DependencyType = {}));
40
+ function isProjectGraphProjectNode(node) {
41
+ return node.type === 'app' || node.type === 'e2e' || node.type === 'lib';
42
+ }
43
+ function isProjectGraphExternalNode(node) {
44
+ return isProjectGraphProjectNode(node) === false;
45
+ }