Skip to content

Commit d2e73b1

Browse files
author
Angular Builds
committed
33ed6e8 refactor: move builtin module imports to use node: prefix imports
1 parent 56251a1 commit d2e73b1

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngtools/webpack",
3-
"version": "19.2.0-next.2+sha-c0c1670",
3+
"version": "19.2.0-next.2+sha-33ed6e8",
44
"description": "Webpack plugin that AoT compiles your Angular components and modules.",
55
"main": "./src/index.js",
66
"typings": "src/index.d.ts",

src/ivy/host.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ exports.augmentHostWithReplacements = augmentHostWithReplacements;
4646
exports.augmentHostWithSubstitutions = augmentHostWithSubstitutions;
4747
exports.augmentProgramWithVersioning = augmentProgramWithVersioning;
4848
exports.augmentHostWithCaching = augmentHostWithCaching;
49-
const crypto_1 = require("crypto");
50-
const path = __importStar(require("path"));
49+
const node_crypto_1 = require("node:crypto");
50+
const path = __importStar(require("node:path"));
5151
const ts = __importStar(require("typescript"));
5252
const paths_1 = require("./paths");
5353
function augmentHostWithResources(host, resourceLoader, options = {}) {
@@ -204,7 +204,7 @@ function augmentProgramWithVersioning(program) {
204204
const files = baseGetSourceFiles(...parameters);
205205
for (const file of files) {
206206
if (file.version === undefined) {
207-
file.version = (0, crypto_1.createHash)('sha256').update(file.text).digest('hex');
207+
file.version = (0, node_crypto_1.createHash)('sha256').update(file.text).digest('hex');
208208
}
209209
}
210210
return files;

src/ivy/loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var __importStar = (this && this.__importStar) || (function () {
4242
Object.defineProperty(exports, "__esModule", { value: true });
4343
exports.angularWebpackLoader = angularWebpackLoader;
4444
exports.default = angularWebpackLoader;
45-
const path = __importStar(require("path"));
45+
const path = __importStar(require("node:path"));
4646
const symbol_1 = require("./symbol");
4747
const JS_FILE_REGEXP = /\.[cm]?js$/;
4848
function angularWebpackLoader(content, map) {

src/ivy/paths.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var __importStar = (this && this.__importStar) || (function () {
4242
Object.defineProperty(exports, "__esModule", { value: true });
4343
exports.externalizePath = void 0;
4444
exports.normalizePath = normalizePath;
45-
const nodePath = __importStar(require("path"));
45+
const nodePath = __importStar(require("node:path"));
4646
const normalizationCache = new Map();
4747
function normalizePath(path) {
4848
let result = normalizationCache.get(path);

src/ivy/plugin.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var __importStar = (this && this.__importStar) || (function () {
4141
})();
4242
Object.defineProperty(exports, "__esModule", { value: true });
4343
exports.AngularWebpackPlugin = exports.imageDomains = void 0;
44-
const assert_1 = require("assert");
44+
const node_assert_1 = require("node:assert");
4545
const ts = __importStar(require("typescript"));
4646
const paths_plugin_1 = require("../paths-plugin");
4747
const resource_loader_1 = require("../resource_loader");
@@ -91,14 +91,14 @@ class AngularWebpackPlugin {
9191
// The compilerCliModule field is guaranteed to be defined during a compilation
9292
// due to the `beforeCompile` hook. Usage of this property accessor prior to the
9393
// hook execution is an implementation error.
94-
assert_1.strict.ok(this.compilerCliModule, `'@angular/compiler-cli' used prior to Webpack compilation.`);
94+
node_assert_1.strict.ok(this.compilerCliModule, `'@angular/compiler-cli' used prior to Webpack compilation.`);
9595
return this.compilerCliModule;
9696
}
9797
get compilerCliTooling() {
9898
// The compilerCliToolingModule field is guaranteed to be defined during a compilation
9999
// due to the `beforeCompile` hook. Usage of this property accessor prior to the
100100
// hook execution is an implementation error.
101-
assert_1.strict.ok(this.compilerCliToolingModule, `'@angular/compiler-cli' used prior to Webpack compilation.`);
101+
node_assert_1.strict.ok(this.compilerCliToolingModule, `'@angular/compiler-cli' used prior to Webpack compilation.`);
102102
return this.compilerCliToolingModule;
103103
}
104104
get options() {
@@ -527,7 +527,7 @@ class AngularWebpackPlugin {
527527
this.compilerCliToolingModule ??= await new Function(`return import('@angular/compiler-cli/private/tooling');`)();
528528
}
529529
async addFileEmitHistory(filePath, content) {
530-
assert_1.strict.ok(this.webpackCreateHash, 'File emitter is used prior to Webpack compilation');
530+
node_assert_1.strict.ok(this.webpackCreateHash, 'File emitter is used prior to Webpack compilation');
531531
const historyData = {
532532
length: content.length,
533533
hash: this.webpackCreateHash('xxhash64').update(content).digest(),

src/paths-plugin.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var __importStar = (this && this.__importStar) || (function () {
4141
})();
4242
Object.defineProperty(exports, "__esModule", { value: true });
4343
exports.TypeScriptPathsPlugin = void 0;
44-
const path = __importStar(require("path"));
44+
const path = __importStar(require("node:path"));
4545
class TypeScriptPathsPlugin {
4646
baseUrl;
4747
patterns;

uniqueId

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fri Feb 14 2025 15:42:49 GMT+0000 (Coordinated Universal Time)
1+
Fri Feb 14 2025 19:18:22 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)