@angular-devkit/core 14.0.0-next.1 → 14.0.0-next.12
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/BUILD.bazel +0 -1
- package/node/experimental/index.js +5 -1
- package/node/experimental/jobs/index.js +5 -1
- package/node/host.js +10 -42
- package/node/index.js +5 -1
- package/node/testing/index.js +5 -1
- package/package.json +4 -5
- package/src/analytics/index.d.ts +1 -1
- package/src/analytics/index.js +7 -3
- package/src/{exception/exception.d.ts → exception.d.ts} +15 -0
- package/src/{exception/exception.js → exception.js} +15 -0
- package/src/experimental/jobs/create-job-handler.d.ts +1 -1
- package/src/experimental/jobs/create-job-handler.js +4 -4
- package/src/experimental/jobs/exception.d.ts +1 -1
- package/src/experimental/jobs/exception.js +3 -3
- package/src/experimental/jobs/index.js +5 -1
- package/src/experimental/jobs/strategy.d.ts +2 -2
- package/src/experimental/jobs/strategy.js +11 -4
- package/src/experimental.js +5 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +6 -2
- package/src/json/index.js +5 -1
- package/src/json/schema/index.js +5 -1
- package/src/json/schema/registry.d.ts +1 -1
- package/src/json/schema/registry.js +6 -2
- package/src/logger/index.js +5 -1
- package/src/utils/index.js +5 -1
- package/src/utils/strings.d.ts +1 -1
- package/src/utils/strings.js +2 -2
- package/src/virtual-fs/host/index.js +5 -1
- package/src/virtual-fs/index.js +5 -1
- package/src/virtual-fs/path.js +4 -4
- package/src/workspace/definitions.d.ts +1 -1
- package/src/workspace/definitions.js +8 -7
- package/src/workspace/index.js +5 -1
- package/src/workspace/json/metadata.d.ts +12 -13
- package/src/workspace/json/metadata.js +28 -19
- package/src/workspace/json/reader.js +71 -86
- package/src/workspace/json/utilities.d.ts +3 -7
- package/src/workspace/json/utilities.js +62 -180
- package/src/workspace/json/writer.js +26 -192
- package/src/exception/index.d.ts +0 -8
- package/src/exception/index.js +0 -20
- package/src/json/parser.d.ts +0 -104
- package/src/json/parser.js +0 -788
- package/src/json/parser_ast.d.ts +0 -67
- package/src/json/parser_ast.js +0 -9
package/src/json/parser.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright Google LLC All Rights Reserved.
|
|
4
|
-
*
|
|
5
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
-
* found in the LICENSE file at https://angular.io/license
|
|
7
|
-
*/
|
|
8
|
-
import { BaseException } from '../exception';
|
|
9
|
-
import { JsonAstNode, Position } from './parser_ast';
|
|
10
|
-
import { JsonValue } from './utils';
|
|
11
|
-
export declare class JsonException extends BaseException {
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* A character was invalid in this context.
|
|
15
|
-
* @deprecated
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare class InvalidJsonCharacterException extends JsonException {
|
|
19
|
-
invalidChar: string;
|
|
20
|
-
line: number;
|
|
21
|
-
character: number;
|
|
22
|
-
offset: number;
|
|
23
|
-
constructor(context: JsonParserContext);
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* More input was expected, but we reached the end of the stream.
|
|
27
|
-
* @deprecated
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
export declare class UnexpectedEndOfInputException extends JsonException {
|
|
31
|
-
constructor(_context: JsonParserContext);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* An error happened within a file.
|
|
35
|
-
* @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
|
|
36
|
-
*/
|
|
37
|
-
export declare class PathSpecificJsonException extends JsonException {
|
|
38
|
-
path: string;
|
|
39
|
-
exception: JsonException;
|
|
40
|
-
constructor(path: string, exception: JsonException);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Context passed around the parser with information about where we currently are in the parse.
|
|
44
|
-
* @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
|
|
45
|
-
*/
|
|
46
|
-
export interface JsonParserContext {
|
|
47
|
-
position: Position;
|
|
48
|
-
previous: Position;
|
|
49
|
-
readonly original: string;
|
|
50
|
-
readonly mode: JsonParseMode;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* The Parse mode used for parsing the JSON string.
|
|
54
|
-
*/
|
|
55
|
-
export declare enum JsonParseMode {
|
|
56
|
-
Strict = 0,
|
|
57
|
-
CommentsAllowed = 1,
|
|
58
|
-
SingleQuotesAllowed = 2,
|
|
59
|
-
IdentifierKeyNamesAllowed = 4,
|
|
60
|
-
TrailingCommasAllowed = 8,
|
|
61
|
-
HexadecimalNumberAllowed = 16,
|
|
62
|
-
MultiLineStringAllowed = 32,
|
|
63
|
-
LaxNumberParsingAllowed = 64,
|
|
64
|
-
NumberConstantsAllowed = 128,
|
|
65
|
-
Default = 0,
|
|
66
|
-
Loose = 255,
|
|
67
|
-
Json = 0,
|
|
68
|
-
Json5 = 255
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Parse the JSON string and return its AST. The AST may be losing data (end comments are
|
|
72
|
-
* discarded for example, and space characters are not represented in the AST), but all values
|
|
73
|
-
* will have a single node in the AST (a 1-to-1 mapping).
|
|
74
|
-
*
|
|
75
|
-
* @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
|
|
76
|
-
* @param input The string to use.
|
|
77
|
-
* @param mode The mode to parse the input with. {@see JsonParseMode}.
|
|
78
|
-
* @returns {JsonAstNode} The root node of the value of the AST.
|
|
79
|
-
*/
|
|
80
|
-
export declare function parseJsonAst(input: string, mode?: JsonParseMode): JsonAstNode;
|
|
81
|
-
/**
|
|
82
|
-
* Options for the parseJson() function.
|
|
83
|
-
* @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
|
|
84
|
-
*/
|
|
85
|
-
export interface ParseJsonOptions {
|
|
86
|
-
/**
|
|
87
|
-
* If omitted, will only emit errors related to the content of the JSON. If specified, any
|
|
88
|
-
* JSON errors will also include the path of the file that caused the error.
|
|
89
|
-
*/
|
|
90
|
-
path?: string;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Parse a JSON string into its value. This discards the AST and only returns the value itself.
|
|
94
|
-
*
|
|
95
|
-
* If a path option is pass, it also absorbs JSON parsing errors and return a new error with the
|
|
96
|
-
* path in it. Useful for showing errors when parsing from a file.
|
|
97
|
-
*
|
|
98
|
-
* @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
|
|
99
|
-
* @param input The string to parse.
|
|
100
|
-
* @param mode The mode to parse the input with. {@see JsonParseMode}.
|
|
101
|
-
* @param options Additional optinos for parsing.
|
|
102
|
-
* @returns {JsonValue} The value represented by the JSON string.
|
|
103
|
-
*/
|
|
104
|
-
export declare function parseJson(input: string, mode?: JsonParseMode, options?: ParseJsonOptions): JsonValue;
|