Skip to content

Commit 302a96d

Browse files
author
Angular Builds
committed
144f2bf build: update to TypeScript 5.5
1 parent 310031f commit 302a96d

25 files changed

+59
-79
lines changed

node/cli-logger.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
/// <reference types="node" />
98
import { logging } from '../src';
109
export interface ProcessOutput {
1110
write(buffer: string | Buffer): boolean;

node/cli-logger.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.createConsoleLogger = void 0;
10+
exports.createConsoleLogger = createConsoleLogger;
1111
const rxjs_1 = require("rxjs");
1212
const src_1 = require("../src");
1313
/**
@@ -55,4 +55,3 @@ function createConsoleLogger(verbose = false, stdout = process.stdout, stderr =
5555
});
5656
return logger;
5757
}
58-
exports.createConsoleLogger = createConsoleLogger;

node/host.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
/// <reference types="node" />
98
import { Stats } from 'node:fs';
109
import { Observable } from 'rxjs';
1110
import { Path, PathFragment, virtualFs } from '../src';

node/testing/index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
/// <reference types="node" />
98
import * as fs from 'fs';
109
import { Path, virtualFs } from '../../src';
1110
/**

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular-devkit/core",
3-
"version": "18.1.0-next.0+sha-43f3650",
3+
"version": "18.1.0-next.0+sha-144f2bf",
44
"description": "Angular DevKit - Core Utility Library",
55
"main": "src/index.js",
66
"typings": "src/index.d.ts",

src/json/schema/pointer.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.parseJsonPointer = exports.joinJsonPointer = exports.buildJsonPointer = void 0;
10+
exports.buildJsonPointer = buildJsonPointer;
11+
exports.joinJsonPointer = joinJsonPointer;
12+
exports.parseJsonPointer = parseJsonPointer;
1113
function buildJsonPointer(fragments) {
1214
return ('/' +
1315
fragments
@@ -16,14 +18,12 @@ function buildJsonPointer(fragments) {
1618
})
1719
.join('/'));
1820
}
19-
exports.buildJsonPointer = buildJsonPointer;
2021
function joinJsonPointer(root, ...others) {
2122
if (root == '/') {
2223
return buildJsonPointer(others);
2324
}
2425
return (root + buildJsonPointer(others));
2526
}
26-
exports.joinJsonPointer = joinJsonPointer;
2727
function parseJsonPointer(pointer) {
2828
if (pointer === '') {
2929
return [];
@@ -36,4 +36,3 @@ function parseJsonPointer(pointer) {
3636
.split(/\//)
3737
.map((str) => str.replace(/~1/g, '/').replace(/~0/g, '~'));
3838
}
39-
exports.parseJsonPointer = parseJsonPointer;

src/json/schema/schema.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.mergeSchemas = exports.isJsonSchema = void 0;
10+
exports.isJsonSchema = isJsonSchema;
11+
exports.mergeSchemas = mergeSchemas;
1112
const utils_1 = require("../utils");
1213
function isJsonSchema(value) {
1314
return (0, utils_1.isJsonObject)(value) || value === false || value === true;
1415
}
15-
exports.isJsonSchema = isJsonSchema;
1616
/**
1717
* Return a schema that is the merge of all subschemas, ie. it should validate all the schemas
1818
* that were passed in. It is possible to make an invalid schema this way, e.g. by using
@@ -49,4 +49,3 @@ function mergeSchemas(...schemas) {
4949
}
5050
}, true);
5151
}
52-
exports.mergeSchemas = mergeSchemas;

src/json/schema/transforms.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.addUndefinedDefaults = void 0;
10+
exports.addUndefinedDefaults = addUndefinedDefaults;
1111
const utils_1 = require("../utils");
1212
const utility_1 = require("./utility");
1313
function addUndefinedDefaults(value, _pointer, schema) {
@@ -91,4 +91,3 @@ function addUndefinedDefaults(value, _pointer, schema) {
9191
}
9292
return value;
9393
}
94-
exports.addUndefinedDefaults = addUndefinedDefaults;

src/json/schema/utility.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.getTypesOfSchema = void 0;
10+
exports.getTypesOfSchema = getTypesOfSchema;
1111
const utils_1 = require("../utils");
1212
const allTypes = ['string', 'integer', 'number', 'object', 'array', 'boolean', 'null'];
1313
function getTypesOfSchema(schema) {
@@ -85,4 +85,3 @@ function getTypesOfSchema(schema) {
8585
}
8686
return potentials;
8787
}
88-
exports.getTypesOfSchema = getTypesOfSchema;

src/json/schema/visitor.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.visitJsonSchema = exports.visitJson = void 0;
10+
exports.visitJson = visitJson;
11+
exports.visitJsonSchema = visitJsonSchema;
1112
const rxjs_1 = require("rxjs");
1213
const pointer_1 = require("./pointer");
1314
function _getObjectSubSchema(schema, key) {
@@ -84,7 +85,6 @@ function _visitJsonRecursive(json, visitor, ptr, schema, refResolver, context, r
8485
function visitJson(json, visitor, schema, refResolver, context) {
8586
return _visitJsonRecursive(json, visitor, (0, pointer_1.buildJsonPointer)([]), schema, refResolver, context);
8687
}
87-
exports.visitJson = visitJson;
8888
function visitJsonSchema(schema, visitor) {
8989
if (schema === false || schema === true) {
9090
// Nothing to visit.
@@ -144,4 +144,3 @@ function visitJsonSchema(schema, visitor) {
144144
}
145145
_traverse(schema, (0, pointer_1.buildJsonPointer)([]), schema);
146146
}
147-
exports.visitJsonSchema = visitJsonSchema;

src/json/utils.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.isJsonArray = exports.isJsonObject = void 0;
10+
exports.isJsonObject = isJsonObject;
11+
exports.isJsonArray = isJsonArray;
1112
function isJsonObject(value) {
1213
return value != null && typeof value === 'object' && !Array.isArray(value);
1314
}
14-
exports.isJsonObject = isJsonObject;
1515
function isJsonArray(value) {
1616
return Array.isArray(value);
1717
}
18-
exports.isJsonArray = isJsonArray;

src/utils/lang.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.isPromise = void 0;
10+
exports.isPromise = isPromise;
1111
// Borrowed from @angular/core
1212
/**
1313
* Determine if the argument is shaped like a Promise
@@ -18,4 +18,3 @@ function isPromise(obj) {
1818
// It's up to the caller to ensure that obj.then conforms to the spec
1919
return !!obj && typeof obj.then === 'function';
2020
}
21-
exports.isPromise = isPromise;

src/utils/literals.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.trimNewlines = exports.stripIndents = exports.stripIndent = exports.indentBy = exports.oneLine = void 0;
10+
exports.oneLine = oneLine;
11+
exports.indentBy = indentBy;
12+
exports.stripIndent = stripIndent;
13+
exports.stripIndents = stripIndents;
14+
exports.trimNewlines = trimNewlines;
1115
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1216
function oneLine(strings, ...values) {
1317
const endResult = String.raw(strings, ...values);
1418
return endResult.replace(/(?:\r?\n(?:\s*))+/gm, ' ').trim();
1519
}
16-
exports.oneLine = oneLine;
1720
function indentBy(indentations) {
1821
let i = '';
1922
while (indentations--) {
@@ -23,7 +26,6 @@ function indentBy(indentations) {
2326
return i + stripIndent(strings, ...values).replace(/\n/g, '\n' + i);
2427
};
2528
}
26-
exports.indentBy = indentBy;
2729
// eslint-disable-next-line @typescript-eslint/no-explicit-any
2830
function stripIndent(strings, ...values) {
2931
const endResult = String.raw(strings, ...values);
@@ -37,7 +39,6 @@ function stripIndent(strings, ...values) {
3739
const regexp = new RegExp('^[ \\t]{' + indent + '}', 'gm');
3840
return (indent > 0 ? endResult.replace(regexp, '') : endResult).trim();
3941
}
40-
exports.stripIndent = stripIndent;
4142
// eslint-disable-next-line @typescript-eslint/no-explicit-any
4243
function stripIndents(strings, ...values) {
4344
return String.raw(strings, ...values)
@@ -46,7 +47,6 @@ function stripIndents(strings, ...values) {
4647
.join('\n')
4748
.trim();
4849
}
49-
exports.stripIndents = stripIndents;
5050
// eslint-disable-next-line @typescript-eslint/no-explicit-any
5151
function trimNewlines(strings, ...values) {
5252
const endResult = String.raw(strings, ...values);
@@ -56,4 +56,3 @@ function trimNewlines(strings, ...values) {
5656
// Remove the newline at the end and following whitespace.
5757
.replace(/(?:\r?\n(?:\s*))$/, ''));
5858
}
59-
exports.trimNewlines = trimNewlines;

src/utils/object.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.deepCopy = void 0;
10+
exports.deepCopy = deepCopy;
1111
const copySymbol = Symbol();
1212
function deepCopy(value) {
1313
if (Array.isArray(value)) {
@@ -34,4 +34,3 @@ function deepCopy(value) {
3434
return value;
3535
}
3636
}
37-
exports.deepCopy = deepCopy;

src/utils/strings.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.levenshtein = exports.capitalize = exports.underscore = exports.classify = exports.camelize = exports.dasherize = exports.decamelize = void 0;
10+
exports.decamelize = decamelize;
11+
exports.dasherize = dasherize;
12+
exports.camelize = camelize;
13+
exports.classify = classify;
14+
exports.underscore = underscore;
15+
exports.capitalize = capitalize;
16+
exports.levenshtein = levenshtein;
1117
const STRING_DASHERIZE_REGEXP = /[ _]/g;
1218
const STRING_DECAMELIZE_REGEXP = /([a-z\d])([A-Z])/g;
1319
const STRING_CAMELIZE_REGEXP = /(-|_|\.|\s)+(.)?/g;
@@ -30,7 +36,6 @@ const STRING_UNDERSCORE_REGEXP_2 = /-|\s+/g;
3036
function decamelize(str) {
3137
return str.replace(STRING_DECAMELIZE_REGEXP, '$1_$2').toLowerCase();
3238
}
33-
exports.decamelize = decamelize;
3439
/**
3540
Replaces underscores, spaces, or camelCase with dashes.
3641
@@ -48,7 +53,6 @@ exports.decamelize = decamelize;
4853
function dasherize(str) {
4954
return decamelize(str).replace(STRING_DASHERIZE_REGEXP, '-');
5055
}
51-
exports.dasherize = dasherize;
5256
/**
5357
Returns the lowerCamelCase form of a string.
5458
@@ -71,7 +75,6 @@ function camelize(str) {
7175
})
7276
.replace(/^([A-Z])/, (match) => match.toLowerCase());
7377
}
74-
exports.camelize = camelize;
7578
/**
7679
Returns the UpperCamelCase form of a string.
7780
@@ -93,7 +96,6 @@ function classify(str) {
9396
.map((part) => capitalize(camelize(part)))
9497
.join('');
9598
}
96-
exports.classify = classify;
9799
/**
98100
More general than decamelize. Returns the lower_case_and_underscored
99101
form of a string.
@@ -115,7 +117,6 @@ function underscore(str) {
115117
.replace(STRING_UNDERSCORE_REGEXP_2, '_')
116118
.toLowerCase();
117119
}
118-
exports.underscore = underscore;
119120
/**
120121
Returns the Capitalized form of a string
121122
@@ -133,7 +134,6 @@ exports.underscore = underscore;
133134
function capitalize(str) {
134135
return str.charAt(0).toUpperCase() + str.slice(1);
135136
}
136-
exports.capitalize = capitalize;
137137
/**
138138
* Calculate the levenshtein distance of two strings.
139139
* See https://en.wikipedia.org/wiki/Levenshtein_distance.
@@ -176,4 +176,3 @@ function levenshtein(a, b) {
176176
}
177177
return matrix[b.length][a.length];
178178
}
179-
exports.levenshtein = levenshtein;

src/utils/template.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.template = exports.templateParser = void 0;
10+
exports.templateParser = templateParser;
11+
exports.template = template;
1112
const source_map_1 = require("source-map");
1213
// Matches <%= expr %>. This does not support structural JavaScript (for/if/...).
1314
const kInterpolateRe = /<%=([\s\S]+?)%>/g;
@@ -105,7 +106,6 @@ function templateParser(sourceText, fileName) {
105106
children,
106107
};
107108
}
108-
exports.templateParser = templateParser;
109109
/**
110110
* Fastest implementation of the templating algorithm. It only add strings and does not bother
111111
* with source maps.
@@ -259,4 +259,3 @@ function template(content, options) {
259259
result.source = source;
260260
return result;
261261
}
262-
exports.template = template;

src/virtual-fs/host/buffer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.fileBuffer = exports.fileBufferToString = exports.stringToFileBuffer = void 0;
10+
exports.fileBuffer = void 0;
11+
exports.stringToFileBuffer = stringToFileBuffer;
12+
exports.fileBufferToString = fileBufferToString;
1113
const node_util_1 = require("node:util");
1214
function stringToFileBuffer(str) {
1315
return new node_util_1.TextEncoder().encode(str).buffer;
1416
}
15-
exports.stringToFileBuffer = stringToFileBuffer;
1617
function fileBufferToString(fileBuffer) {
1718
if (fileBuffer.toString.length === 1) {
1819
return fileBuffer.toString('utf-8');
1920
}
2021
return new node_util_1.TextDecoder('utf-8').decode(new Uint8Array(fileBuffer));
2122
}
22-
exports.fileBufferToString = fileBufferToString;
2323
/** @deprecated use `stringToFileBuffer` instead. */
2424
const fileBuffer = (strings, ...values) => {
2525
return stringToFileBuffer(String.raw(strings, ...values));

src/virtual-fs/host/create.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* found in the LICENSE file at https://angular.io/license
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
10-
exports.createSyncHost = void 0;
10+
exports.createSyncHost = createSyncHost;
1111
const rxjs_1 = require("rxjs");
1212
function wrapAction(action) {
1313
return new rxjs_1.Observable((subscriber) => {
@@ -52,4 +52,3 @@ function createSyncHost(handler) {
5252
}
5353
})();
5454
}
55-
exports.createSyncHost = createSyncHost;

0 commit comments

Comments
 (0)