Skip to content

Commit 7fde698

Browse files
author
Angular Builds
committed
4f2593483 build: update angular packages to version 13
1 parent 1e7542d commit 7fde698

32 files changed

+150
-150
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"schematics"
1919
],
2020
"dependencies": {
21-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#537e3a194",
21+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#4f2593483",
2222
"jsonc-parser": "3.0.0",
2323
"magic-string": "0.25.7",
2424
"ora": "5.4.1",

src/engine/engine.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class SchematicEngine {
267267
case 'null:':
268268
return () => new null_1.NullTree();
269269
case 'empty:':
270-
return () => static_1.empty();
270+
return () => (0, static_1.empty)();
271271
default:
272272
const hostSource = this._host.createSourceFromUrl(url, context);
273273
if (!hostSource) {
@@ -278,13 +278,13 @@ class SchematicEngine {
278278
}
279279
executePostTasks() {
280280
const executors = new Map();
281-
const taskObservable = rxjs_1.from(this._taskSchedulers).pipe(operators_1.concatMap((scheduler) => scheduler.finalize()), operators_1.concatMap((task) => {
281+
const taskObservable = (0, rxjs_1.from)(this._taskSchedulers).pipe((0, operators_1.concatMap)((scheduler) => scheduler.finalize()), (0, operators_1.concatMap)((task) => {
282282
const { name, options } = task.configuration;
283283
const executor = executors.get(name);
284284
if (executor) {
285285
return executor(options, task.context);
286286
}
287-
return this._host.createTaskExecutor(name).pipe(operators_1.concatMap((executor) => {
287+
return this._host.createTaskExecutor(name).pipe((0, operators_1.concatMap)((executor) => {
288288
executors.set(name, executor);
289289
return executor(options, task.context);
290290
}));

src/engine/schematic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ class SchematicImpl {
3737
}
3838
call(options, host, parentContext, executionOptions) {
3939
const context = this._engine.createContext(this, parentContext, executionOptions);
40-
return host.pipe(operators_1.first(), operators_1.concatMap((tree) => this._engine
40+
return host.pipe((0, operators_1.first)(), (0, operators_1.concatMap)((tree) => this._engine
4141
.transformOptions(this, options, context)
42-
.pipe(operators_1.map((o) => [tree, o]))), operators_1.concatMap(([tree, transformedOptions]) => {
42+
.pipe((0, operators_1.map)((o) => [tree, o]))), (0, operators_1.concatMap)(([tree, transformedOptions]) => {
4343
let input;
4444
let scoped = false;
4545
if (executionOptions && executionOptions.scope) {
@@ -49,7 +49,7 @@ class SchematicImpl {
4949
else {
5050
input = tree;
5151
}
52-
return call_1.callRule(this._factory(transformedOptions), rxjs_1.of(input), context).pipe(operators_1.map((output) => {
52+
return (0, call_1.callRule)(this._factory(transformedOptions), (0, rxjs_1.of)(input), context).pipe((0, operators_1.map)((output) => {
5353
if (output === input) {
5454
return tree;
5555
}

src/formats/format-validator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ function formatValidator(data, dataSchema, formats) {
1515
for (const format of formats) {
1616
registry.addFormat(format);
1717
}
18-
return registry.compile(dataSchema).pipe(operators_1.mergeMap((validator) => validator(data)));
18+
return registry.compile(dataSchema).pipe((0, operators_1.mergeMap)((validator) => validator(data)));
1919
}
2020
exports.formatValidator = formatValidator;

src/formats/path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ exports.pathFormat = {
1515
async: false,
1616
validate: (path) => {
1717
// Check path is normalized already.
18-
return path === core_1.normalize(path);
18+
return path === (0, core_1.normalize)(path);
1919
// TODO: check if path is valid (is that just checking if it's normalized?)
2020
// TODO: check path is from root of schematics even if passed absolute
2121
// TODO: error out if path is outside of host

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,16 @@ __exportStar(require("./sink/host"), exports);
5858
__exportStar(require("./sink/sink"), exports);
5959
exports.Tree = {
6060
empty() {
61-
return static_1.empty();
61+
return (0, static_1.empty)();
6262
},
6363
branch(tree) {
64-
return static_1.branch(tree);
64+
return (0, static_1.branch)(tree);
6565
},
6666
merge(tree, other, strategy = interface_1.MergeStrategy.Default) {
67-
return static_1.merge(tree, other, strategy);
67+
return (0, static_1.merge)(tree, other, strategy);
6868
},
6969
partition(tree, predicate) {
70-
return static_1.partition(tree, predicate);
70+
return (0, static_1.partition)(tree, predicate);
7171
},
7272
optimize(tree) {
7373
return tree;

src/rules/base.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,31 @@ exports.source = source;
2727
* A source that returns an empty tree.
2828
*/
2929
function empty() {
30-
return () => static_1.empty();
30+
return () => (0, static_1.empty)();
3131
}
3232
exports.empty = empty;
3333
/**
3434
* Chain multiple rules into a single rule.
3535
*/
3636
function chain(rules) {
3737
return (tree, context) => {
38-
return rules.reduce((acc, curr) => call_1.callRule(curr, acc, context), tree);
38+
return rules.reduce((acc, curr) => (0, call_1.callRule)(curr, acc, context), tree);
3939
};
4040
}
4141
exports.chain = chain;
4242
/**
4343
* Apply multiple rules to a source, and returns the source transformed.
4444
*/
4545
function apply(source, rules) {
46-
return (context) => call_1.callRule(chain(rules), call_1.callSource(source, context), context);
46+
return (context) => (0, call_1.callRule)(chain(rules), (0, call_1.callSource)(source, context), context);
4747
}
4848
exports.apply = apply;
4949
/**
5050
* Merge an input tree with the source passed in.
5151
*/
5252
function mergeWith(source, strategy = interface_1.MergeStrategy.Default) {
5353
return (tree, context) => {
54-
return call_1.callSource(source, context).pipe(operators_1.map((sourceTree) => tree.merge(sourceTree, strategy || context.strategy)), operators_1.mapTo(tree));
54+
return (0, call_1.callSource)(source, context).pipe((0, operators_1.map)((sourceTree) => tree.merge(sourceTree, strategy || context.strategy)), (0, operators_1.mapTo)(tree));
5555
};
5656
}
5757
exports.mergeWith = mergeWith;
@@ -71,12 +71,12 @@ function filter(predicate) {
7171
}
7272
exports.filter = filter;
7373
function asSource(rule) {
74-
return (context) => call_1.callRule(rule, static_1.empty(), context);
74+
return (context) => (0, call_1.callRule)(rule, (0, static_1.empty)(), context);
7575
}
7676
exports.asSource = asSource;
7777
function branchAndMerge(rule, strategy = interface_1.MergeStrategy.Default) {
7878
return (tree, context) => {
79-
return call_1.callRule(rule, tree.branch(), context).pipe(operators_1.map((branch) => tree.merge(branch, strategy || context.strategy)), operators_1.mapTo(tree));
79+
return (0, call_1.callRule)(rule, tree.branch(), context).pipe((0, operators_1.map)((branch) => tree.merge(branch, strategy || context.strategy)), (0, operators_1.mapTo)(tree));
8080
};
8181
}
8282
exports.branchAndMerge = branchAndMerge;
@@ -93,8 +93,8 @@ function when(predicate, operator) {
9393
exports.when = when;
9494
function partitionApplyMerge(predicate, ruleYes, ruleNo) {
9595
return (tree, context) => {
96-
const [yes, no] = static_1.partition(tree, predicate);
97-
return rxjs_1.concat(call_1.callRule(ruleYes, yes, context), call_1.callRule(ruleNo || noop(), no, context)).pipe(operators_1.toArray(), operators_1.map(([yesTree, noTree]) => {
96+
const [yes, no] = (0, static_1.partition)(tree, predicate);
97+
return (0, rxjs_1.concat)((0, call_1.callRule)(ruleYes, yes, context), (0, call_1.callRule)(ruleNo || noop(), no, context)).pipe((0, operators_1.toArray)(), (0, operators_1.map)(([yesTree, noTree]) => {
9898
yesTree.merge(noTree, context.strategy);
9999
return yesTree;
100100
}));
@@ -142,7 +142,7 @@ exports.composeFileOperators = composeFileOperators;
142142
function applyToSubtree(path, rules) {
143143
return (tree, context) => {
144144
const scoped = new scoped_1.ScopedTree(tree, path);
145-
return call_1.callRule(chain(rules), scoped, context).pipe(operators_1.map((result) => {
145+
return (0, call_1.callRule)(chain(rules), scoped, context).pipe((0, operators_1.map)((result) => {
146146
if (result === scoped) {
147147
return tree;
148148
}

src/rules/call.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,56 +54,56 @@ class InvalidSourceResultException extends core_1.BaseException {
5454
exports.InvalidSourceResultException = InvalidSourceResultException;
5555
function callSource(source, context) {
5656
const result = source(context);
57-
if (rxjs_1.isObservable(result)) {
57+
if ((0, rxjs_1.isObservable)(result)) {
5858
// Only return the last Tree, and make sure it's a Tree.
59-
return result.pipe(operators_1.defaultIfEmpty(), operators_1.last(), operators_1.tap((inner) => {
59+
return result.pipe((0, operators_1.defaultIfEmpty)(), (0, operators_1.last)(), (0, operators_1.tap)((inner) => {
6060
if (!inner || !(interface_1.TreeSymbol in inner)) {
6161
throw new InvalidSourceResultException(inner);
6262
}
6363
}));
6464
}
6565
else if (result && interface_1.TreeSymbol in result) {
66-
return rxjs_1.of(result);
66+
return (0, rxjs_1.of)(result);
6767
}
6868
else {
69-
return rxjs_1.throwError(new InvalidSourceResultException(result));
69+
return (0, rxjs_1.throwError)(new InvalidSourceResultException(result));
7070
}
7171
}
7272
exports.callSource = callSource;
7373
function callRule(rule, input, context) {
74-
return (rxjs_1.isObservable(input) ? input : rxjs_1.of(input)).pipe(operators_1.mergeMap((inputTree) => {
74+
return ((0, rxjs_1.isObservable)(input) ? input : (0, rxjs_1.of)(input)).pipe((0, operators_1.mergeMap)((inputTree) => {
7575
const result = rule(inputTree, context);
7676
if (!result) {
77-
return rxjs_1.of(inputTree);
77+
return (0, rxjs_1.of)(inputTree);
7878
}
7979
else if (typeof result == 'function') {
8080
// This is considered a Rule, chain the rule and return its output.
8181
return callRule(result, inputTree, context);
8282
}
83-
else if (rxjs_1.isObservable(result)) {
83+
else if ((0, rxjs_1.isObservable)(result)) {
8484
// Only return the last Tree, and make sure it's a Tree.
85-
return result.pipe(operators_1.defaultIfEmpty(), operators_1.last(), operators_1.tap((inner) => {
85+
return result.pipe((0, operators_1.defaultIfEmpty)(), (0, operators_1.last)(), (0, operators_1.tap)((inner) => {
8686
if (!inner || !(interface_1.TreeSymbol in inner)) {
8787
throw new InvalidRuleResultException(inner);
8888
}
8989
}));
9090
}
91-
else if (core_1.isPromise(result)) {
92-
return rxjs_1.from(result).pipe(operators_1.mergeMap((inner) => {
91+
else if ((0, core_1.isPromise)(result)) {
92+
return (0, rxjs_1.from)(result).pipe((0, operators_1.mergeMap)((inner) => {
9393
if (typeof inner === 'function') {
9494
// This is considered a Rule, chain the rule and return its output.
9595
return callRule(inner, inputTree, context);
9696
}
9797
else {
98-
return rxjs_1.of(inputTree);
98+
return (0, rxjs_1.of)(inputTree);
9999
}
100100
}));
101101
}
102102
else if (interface_1.TreeSymbol in result) {
103-
return rxjs_1.of(result);
103+
return (0, rxjs_1.of)(result);
104104
}
105105
else {
106-
return rxjs_1.throwError(new InvalidRuleResultException(result));
106+
return (0, rxjs_1.throwError)(new InvalidRuleResultException(result));
107107
}
108108
}));
109109
}

src/rules/move.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function move(from, to) {
1515
to = from;
1616
from = '/';
1717
}
18-
const fromPath = core_1.normalize('/' + from);
19-
const toPath = core_1.normalize('/' + to);
18+
const fromPath = (0, core_1.normalize)('/' + from);
19+
const toPath = (0, core_1.normalize)('/' + to);
2020
if (fromPath === toPath) {
2121
return base_1.noop;
2222
}
@@ -28,7 +28,7 @@ function move(from, to) {
2828
else {
2929
// fromPath is a directory
3030
tree.getDir(fromPath).visit((path) => {
31-
tree.rename(path, core_1.join(toPath, path.substr(fromPath.length)));
31+
tree.rename(path, (0, core_1.join)(toPath, path.substr(fromPath.length)));
3232
});
3333
}
3434
return tree;

src/rules/rename.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ exports.rename = void 0;
1111
const core_1 = require("@angular-devkit/core");
1212
const base_1 = require("./base");
1313
function rename(match, to) {
14-
return base_1.forEach((entry) => {
14+
return (0, base_1.forEach)((entry) => {
1515
if (match(entry.path, entry)) {
1616
return {
1717
content: entry.content,
18-
path: core_1.normalize(to(entry.path, entry)),
18+
path: (0, core_1.normalize)(to(entry.path, entry)),
1919
};
2020
}
2121
else {

0 commit comments

Comments
 (0)