@nstudio/xplat 17.0.0 → 19.0.0-alpha.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": "@nstudio/xplat",
3
- "version": "17.0.0",
3
+ "version": "19.0.0-alpha.0",
4
4
  "description": "Cross-platform (xplat) tools for Nx workspaces.",
5
5
  "homepage": "https://nstudio.io/xplat",
6
6
  "repository": {
@@ -41,12 +41,12 @@
41
41
  "postinstall": "node src/utils/postinstall.js"
42
42
  },
43
43
  "dependencies": {
44
- "@nx/angular": "^17.0.0",
45
- "@nx/devkit": "^17.0.0",
46
- "@nx/js": "^17.0.0",
47
- "@nx/linter": "^17.0.0",
48
- "@nstudio/focus": "17.0.0",
49
- "@nstudio/xplat-utils": "17.0.0"
44
+ "@nx/angular": "^19.0.0",
45
+ "@nx/devkit": "^19.0.0",
46
+ "@nx/js": "^19.0.0",
47
+ "@nx/eslint": "19.0.0",
48
+ "@nstudio/focus": "19.0.0-alpha.0",
49
+ "@nstudio/xplat-utils": "19.0.0-alpha.0"
50
50
  },
51
51
  "author": "Nathan Walker",
52
52
  "license": "MIT",
@@ -18,7 +18,7 @@ describe('xplat schematic', () => {
18
18
  let appTree;
19
19
  const defaultOptions = {
20
20
  name: 'sample',
21
- prefix: 'tt',
21
+ prefix: 'tt', // foo test
22
22
  isTesting: true,
23
23
  };
24
24
  beforeEach(() => {
@@ -20,7 +20,7 @@ describe('xplat init', () => {
20
20
  let appTree;
21
21
  const defaultOptions = {
22
22
  npmScope: 'testing',
23
- prefix: 'ft',
23
+ prefix: 'ft', // foo test
24
24
  isTesting: true,
25
25
  };
26
26
  beforeEach(() => {
package/src/utils/ast.js CHANGED
@@ -2,12 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.insert = exports.addGlobal = void 0;
4
4
  const js_1 = require("@nx/js");
5
- const typescript_1 = require("nx/src/utils/typescript");
6
5
  const ts = require("typescript");
7
6
  const general_1 = require("./general");
8
7
  function addGlobal(tree, source, modulePath, statement, isExport) {
9
8
  if (isExport) {
10
- const allExports = (0, typescript_1.findNodes)(source, ts.SyntaxKind.ExportDeclaration);
9
+ const allExports = (0, js_1.findNodes)(source, ts.SyntaxKind.ExportDeclaration);
11
10
  // console.log('allExports:', allExports.length);
12
11
  if (allExports.length > 0) {
13
12
  const lastExport = allExports[allExports.length - 1];
@@ -19,7 +18,7 @@ function addGlobal(tree, source, modulePath, statement, isExport) {
19
18
  }
20
19
  }
21
20
  else {
22
- const allImports = (0, typescript_1.findNodes)(source, ts.SyntaxKind.ImportDeclaration);
21
+ const allImports = (0, js_1.findNodes)(source, ts.SyntaxKind.ImportDeclaration);
23
22
  if (allImports.length > 0) {
24
23
  const lastImport = allImports[allImports.length - 1];
25
24
  return (0, js_1.insertChange)(tree, source, modulePath, lastImport.end + 1, `\n${statement}\n`);
@@ -156,7 +156,7 @@ function createRunCallbackTask() {
156
156
  return {
157
157
  name: 'RunCallback',
158
158
  create: () => {
159
- return Promise.resolve(({ callback }) => __awaiter(this, void 0, void 0, function* () {
159
+ return Promise.resolve((_a) => __awaiter(this, [_a], void 0, function* ({ callback }) {
160
160
  yield callback();
161
161
  }));
162
162
  },
@@ -60,7 +60,7 @@ class CLIOutput {
60
60
  error({ title, slug, bodyLines }) {
61
61
  this.addNewline();
62
62
  this.writeOutputTitle({
63
- label: ' ERROR ',
63
+ label: ' ERROR ', //chalk.reset.inverse.bold.red(' ERROR '),
64
64
  title: title, //chalk.bold.red(title),
65
65
  });
66
66
  this.writeOptionalOutputBody(bodyLines);
@@ -81,7 +81,7 @@ class CLIOutput {
81
81
  warn({ title, slug, bodyLines }) {
82
82
  this.addNewline();
83
83
  this.writeOutputTitle({
84
- label: ' WARNING ',
84
+ label: ' WARNING ', //chalk.reset.inverse.bold.yellow(' WARNING '),
85
85
  title: title, //chalk.bold.yellow(title),
86
86
  });
87
87
  this.writeOptionalOutputBody(bodyLines);
@@ -102,7 +102,7 @@ class CLIOutput {
102
102
  note({ title, bodyLines }) {
103
103
  this.addNewline();
104
104
  this.writeOutputTitle({
105
- label: ' NOTE ',
105
+ label: ' NOTE ', //chalk.reset.inverse.bold.keyword('orange')(' NOTE '),
106
106
  title: title, //chalk.bold.keyword('orange')(title),
107
107
  });
108
108
  this.writeOptionalOutputBody(bodyLines);
@@ -111,7 +111,7 @@ class CLIOutput {
111
111
  success({ title }) {
112
112
  this.addNewline();
113
113
  this.writeOutputTitle({
114
- label: ' SUCCESS ',
114
+ label: ' SUCCESS ', //chalk.reset.inverse.bold.green(' SUCCESS '),
115
115
  title: title, //chalk.bold.green(title),
116
116
  });
117
117
  this.addNewline();
@@ -6,7 +6,7 @@ const testing_1 = require("@angular-devkit/schematics/testing");
6
6
  const testRunner = new testing_1.SchematicTestRunner('@nstudio/xplat', (0, path_1.join)(__dirname, '../../collection.json'));
7
7
  const migrationTestRunner = new testing_1.SchematicTestRunner('@nstudio/xplat/migrations', (0, path_1.join)(__dirname, '../../migrations.json'));
8
8
  function runSchematic(schematicName, options, tree) {
9
- return testRunner.runSchematicAsync(schematicName, options, tree).toPromise();
9
+ return testRunner.runSchematic(schematicName, options, tree);
10
10
  }
11
11
  exports.runSchematic = runSchematic;
12
12
  function callRule(rule, tree) {
@@ -15,7 +15,6 @@ function callRule(rule, tree) {
15
15
  exports.callRule = callRule;
16
16
  function runMigration(migrationName, options, tree) {
17
17
  return migrationTestRunner
18
- .runSchematicAsync(migrationName, options, tree)
19
- .toPromise();
18
+ .runSchematic(migrationName, options, tree);
20
19
  }
21
20
  exports.runMigration = runMigration;
@@ -1,2 +1,2 @@
1
1
  export declare const xplatVersion = "*";
2
- export declare const nxVersion = "^17.0.0";
2
+ export declare const nxVersion = "^19.0.0";
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.nxVersion = exports.xplatVersion = void 0;
4
- exports.xplatVersion = '17.0.0';
5
- exports.nxVersion = '^17.0.0';
4
+ exports.xplatVersion = '19.0.0-alpha.0';
5
+ exports.nxVersion = '^19.0.0';