@nestjs/schematics 9.0.4 → 9.2.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.
@@ -22,16 +22,16 @@
22
22
  },
23
23
  "devDependencies": {
24
24
  "@nestjs/testing": "^9.0.0",
25
- "@babel/core": "7.20.7",
25
+ "@babel/core": "7.21.8",
26
26
  "@babel/node": "7.20.7",
27
- "@babel/plugin-proposal-decorators": "7.20.7",
28
- "@babel/plugin-transform-runtime": "7.19.6",
29
- "@babel/preset-env": "7.20.2",
30
- "@babel/register": "7.18.9",
31
- "@babel/runtime": "7.20.7",
32
- "jest": "29.3.1",
33
- "nodemon": "2.0.20",
34
- "prettier": "2.8.1",
27
+ "@babel/plugin-proposal-decorators": "7.21.0",
28
+ "@babel/plugin-transform-runtime": "7.21.4",
29
+ "@babel/preset-env": "7.21.5",
30
+ "@babel/register": "7.21.0",
31
+ "@babel/runtime": "7.21.5",
32
+ "jest": "29.5.0",
33
+ "nodemon": "2.0.22",
34
+ "prettier": "2.8.8",
35
35
  "supertest": "6.3.3"
36
36
  },
37
37
  "jest": {
@@ -31,23 +31,23 @@
31
31
  "@nestjs/schematics": "^9.0.0",
32
32
  "@nestjs/testing": "^9.0.0",
33
33
  "@types/express": "^4.17.13",
34
- "@types/jest": "29.2.4",
35
- "@types/node": "18.11.18",
34
+ "@types/jest": "29.5.1",
35
+ "@types/node": "18.16.12",
36
36
  "@types/supertest": "^2.0.11",
37
37
  "@typescript-eslint/eslint-plugin": "^5.0.0",
38
38
  "@typescript-eslint/parser": "^5.0.0",
39
39
  "eslint": "^8.0.1",
40
40
  "eslint-config-prettier": "^8.3.0",
41
41
  "eslint-plugin-prettier": "^4.0.0",
42
- "jest": "29.3.1",
42
+ "jest": "29.5.0",
43
43
  "prettier": "^2.3.2",
44
44
  "source-map-support": "^0.5.20",
45
45
  "supertest": "^6.1.3",
46
- "ts-jest": "29.0.3",
46
+ "ts-jest": "29.1.0",
47
47
  "ts-loader": "^9.2.3",
48
48
  "ts-node": "^10.0.0",
49
- "tsconfig-paths": "4.1.1",
50
- "typescript": "^4.7.4"
49
+ "tsconfig-paths": "4.2.0",
50
+ "typescript": "^5.0.0"
51
51
  },
52
52
  "jest": {
53
53
  "moduleFileExtensions": [
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.main = void 0;
4
4
  const core_1 = require("@angular-devkit/core");
5
5
  const schematics_1 = require("@angular-devkit/schematics");
6
- const fse = require("fs-extra");
6
+ const fs_1 = require("fs");
7
7
  const jsonc_parser_1 = require("jsonc-parser");
8
8
  const formatting_1 = require("../../utils/formatting");
9
9
  const defaults_1 = require("../defaults");
@@ -26,10 +26,10 @@ function main(options) {
26
26
  exports.main = main;
27
27
  function getAppNameFromPackageJson() {
28
28
  try {
29
- if (!fse.existsSync('./package.json')) {
29
+ if (!(0, fs_1.existsSync)('./package.json')) {
30
30
  return defaults_1.DEFAULT_DIR_ENTRY_APP;
31
31
  }
32
- const packageJson = fse.readJsonSync('./package.json');
32
+ const packageJson = JSON.parse(stripBom((0, fs_1.readFileSync)('./package.json', 'utf-8')));
33
33
  if (!packageJson.name) {
34
34
  return defaults_1.DEFAULT_DIR_ENTRY_APP;
35
35
  }
@@ -41,6 +41,12 @@ function getAppNameFromPackageJson() {
41
41
  return defaults_1.DEFAULT_DIR_ENTRY_APP;
42
42
  }
43
43
  }
44
+ function stripBom(value) {
45
+ if (value.charCodeAt(0) === 0xfeff) {
46
+ return value.slice(1);
47
+ }
48
+ return value;
49
+ }
44
50
  function transform(options) {
45
51
  const target = Object.assign({}, options);
46
52
  const defaultSourceRoot = options.rootDir !== undefined ? options.rootDir : defaults_1.DEFAULT_APPS_PATH;
@@ -1,7 +1,7 @@
1
1
  import { JsonValue } from '@angular-devkit/core';
2
2
  import { Tree } from '@angular-devkit/schematics';
3
- export declare type InsertionIndex = (properties: string[]) => number;
4
- export declare type JSONPath = (string | number)[];
3
+ export type InsertionIndex = (properties: string[]) => number;
4
+ export type JSONPath = (string | number)[];
5
5
  export declare class JSONFile {
6
6
  private readonly host;
7
7
  private readonly path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestjs/schematics",
3
- "version": "9.0.4",
3
+ "version": "9.2.0",
4
4
  "description": "Nest - modern, fast, powerful node.js web framework (@schematics)",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -41,36 +41,34 @@
41
41
  },
42
42
  "homepage": "https://github.com/nestjs/schematics#readme",
43
43
  "dependencies": {
44
- "@angular-devkit/core": "15.0.4",
45
- "@angular-devkit/schematics": "15.0.4",
46
- "fs-extra": "11.1.0",
44
+ "@angular-devkit/core": "16.0.1",
45
+ "@angular-devkit/schematics": "16.0.1",
47
46
  "jsonc-parser": "3.2.0",
48
47
  "pluralize": "8.0.0"
49
48
  },
50
49
  "devDependencies": {
51
- "@commitlint/cli": "17.3.0",
52
- "@commitlint/config-angular": "17.3.0",
53
- "@types/fs-extra": "9.0.13",
54
- "@types/jest": "29.2.4",
55
- "@types/node": "18.11.18",
56
- "@typescript-eslint/eslint-plugin": "5.47.1",
57
- "@typescript-eslint/parser": "5.47.1",
50
+ "@commitlint/cli": "17.6.3",
51
+ "@commitlint/config-angular": "17.6.3",
52
+ "@types/jest": "29.5.1",
53
+ "@types/node": "18.16.12",
54
+ "@typescript-eslint/eslint-plugin": "5.59.6",
55
+ "@typescript-eslint/parser": "5.59.6",
58
56
  "cpx": "1.5.0",
59
- "eslint": "8.30.0",
60
- "eslint-config-prettier": "8.5.0",
61
- "eslint-plugin-import": "2.26.0",
57
+ "eslint": "8.40.0",
58
+ "eslint-config-prettier": "8.8.0",
59
+ "eslint-plugin-import": "2.27.5",
62
60
  "gulp": "4.0.2",
63
61
  "gulp-clean": "0.4.0",
64
- "husky": "8.0.2",
65
- "jest": "29.3.1",
62
+ "husky": "8.0.3",
63
+ "jest": "29.5.0",
66
64
  "nyc": "15.1.0",
67
- "release-it": "15.5.1",
68
- "ts-jest": "29.0.3",
65
+ "release-it": "15.10.3",
66
+ "ts-jest": "29.1.0",
69
67
  "ts-node": "10.9.1",
70
- "typescript": "4.9.4"
68
+ "typescript": "5.0.4"
71
69
  },
72
70
  "peerDependencies": {
73
- "typescript": "^4.3.5"
71
+ "typescript": ">=4.3.5"
74
72
  },
75
73
  "schematics": "./dist/collection.json",
76
74
  "nyc": {