@angular-devkit/core 14.0.0-next.2 → 14.0.0-next.5

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/node/host.js CHANGED
@@ -75,21 +75,7 @@ class NodeJsAsyncHost {
75
75
  return (0, rxjs_1.from)(fs_1.promises.readFile((0, src_1.getSystemPath)(path))).pipe((0, operators_1.map)((buffer) => new Uint8Array(buffer).buffer));
76
76
  }
77
77
  delete(path) {
78
- return this.isDirectory(path).pipe((0, operators_1.mergeMap)(async (isDirectory) => {
79
- if (isDirectory) {
80
- // The below should be removed and replaced with just `rm` when support for Node.Js 12 is removed.
81
- const { rm, rmdir } = fs_1.promises;
82
- if (rm) {
83
- await rm((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
84
- }
85
- else {
86
- await rmdir((0, src_1.getSystemPath)(path), { recursive: true, maxRetries: 3 });
87
- }
88
- }
89
- else {
90
- await fs_1.promises.unlink((0, src_1.getSystemPath)(path));
91
- }
92
- }));
78
+ return (0, rxjs_1.from)(fs_1.promises.rm((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 }));
93
79
  }
94
80
  rename(from, to) {
95
81
  return (0, rxjs_1.from)(fs_1.promises.rename((0, src_1.getSystemPath)(from), (0, src_1.getSystemPath)(to)));
@@ -166,32 +152,10 @@ class NodeJsSyncHost {
166
152
  });
167
153
  }
168
154
  delete(path) {
169
- return this.isDirectory(path).pipe((0, operators_1.concatMap)((isDir) => {
170
- if (isDir) {
171
- const dirPaths = (0, fs_1.readdirSync)((0, src_1.getSystemPath)(path));
172
- const rmDirComplete = new rxjs_1.Observable((obs) => {
173
- // The below should be removed and replaced with just `rmSync` when support for Node.Js 12 is removed.
174
- const { rmSync, rmdirSync } = fs_1.default;
175
- if (rmSync) {
176
- rmSync((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
177
- }
178
- else {
179
- rmdirSync((0, src_1.getSystemPath)(path), { recursive: true, maxRetries: 3 });
180
- }
181
- obs.complete();
182
- });
183
- return (0, rxjs_1.concat)(...dirPaths.map((name) => this.delete((0, src_1.join)(path, name))), rmDirComplete);
184
- }
185
- else {
186
- try {
187
- (0, fs_1.unlinkSync)((0, src_1.getSystemPath)(path));
188
- }
189
- catch (err) {
190
- return (0, rxjs_1.throwError)(err);
191
- }
192
- return (0, rxjs_1.of)(undefined);
193
- }
194
- }));
155
+ return new rxjs_1.Observable((obs) => {
156
+ fs_1.default.rmSync((0, src_1.getSystemPath)(path), { force: true, recursive: true, maxRetries: 3 });
157
+ obs.complete();
158
+ });
195
159
  }
196
160
  rename(from, to) {
197
161
  return new rxjs_1.Observable((obs) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-devkit/core",
3
- "version": "14.0.0-next.2",
3
+ "version": "14.0.0-next.5",
4
4
  "description": "Angular DevKit - Core Utility Library",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "ajv-formats": "2.1.1",
17
17
  "ajv": "8.10.0",
18
18
  "fast-json-stable-stringify": "2.1.0",
19
- "magic-string": "0.25.7",
19
+ "magic-string": "0.26.1",
20
20
  "rxjs": "6.6.7",
21
21
  "source-map": "0.7.3"
22
22
  },
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/angular/angular-cli.git"
34
34
  },
35
35
  "engines": {
36
- "node": "^12.20.0 || ^14.15.0 || >=16.10.0",
36
+ "node": "^14.15.0 || >=16.10.0",
37
37
  "npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
38
38
  "yarn": ">= 1.13.0"
39
39
  },
@@ -67,7 +67,7 @@ export declare function camelize(str: string): string;
67
67
  */
68
68
  export declare function classify(str: string): string;
69
69
  /**
70
- More general than decamelize. Returns the lower\_case\_and\_underscored
70
+ More general than decamelize. Returns the lower_case_and_underscored
71
71
  form of a string.
72
72
 
73
73
  ```javascript
@@ -94,7 +94,7 @@ function classify(str) {
94
94
  }
95
95
  exports.classify = classify;
96
96
  /**
97
- More general than decamelize. Returns the lower\_case\_and\_underscored
97
+ More general than decamelize. Returns the lower_case_and_underscored
98
98
  form of a string.
99
99
 
100
100
  ```javascript