@angular/ssr 22.1.2 → 22.1.4
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/fesm2022/_validation-chunk.mjs +1 -2
- package/fesm2022/_validation-chunk.mjs.map +1 -1
- package/fesm2022/node.mjs +62 -9
- package/fesm2022/node.mjs.map +1 -1
- package/fesm2022/ssr.mjs +16 -4
- package/fesm2022/ssr.mjs.map +1 -1
- package/package.json +7 -7
- package/third_party/beasties/index.js +69 -21
- package/third_party/beasties/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/ssr",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.4",
|
|
4
4
|
"description": "Angular server side rendering utilities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@angular-devkit/schematics": "workspace:*",
|
|
40
|
-
"@angular/common": "22.1.
|
|
41
|
-
"@angular/compiler": "22.1.
|
|
42
|
-
"@angular/core": "22.1.
|
|
43
|
-
"@angular/platform-browser": "22.1.
|
|
44
|
-
"@angular/platform-server": "22.1.
|
|
45
|
-
"@angular/router": "22.1.
|
|
40
|
+
"@angular/common": "22.1.1",
|
|
41
|
+
"@angular/compiler": "22.1.1",
|
|
42
|
+
"@angular/core": "22.1.1",
|
|
43
|
+
"@angular/platform-browser": "22.1.1",
|
|
44
|
+
"@angular/platform-server": "22.1.1",
|
|
45
|
+
"@angular/router": "22.1.1",
|
|
46
46
|
"@schematics/angular": "workspace:*",
|
|
47
47
|
"beasties": "0.4.3"
|
|
48
48
|
},
|
|
@@ -605,6 +605,10 @@ function requireStringifier () {
|
|
|
605
605
|
const STYLE_TAG = /(<)(\/?style\b)/gi;
|
|
606
606
|
const COMMENT_OPEN = /(<)(!--)/g;
|
|
607
607
|
|
|
608
|
+
// Characters that end an at-rule name, mirroring RE_AT_END in the tokenizer.
|
|
609
|
+
// Params starting with anything else need a space to stay separate tokens.
|
|
610
|
+
const AT_NAME_END = /[\t\n\f\r "#'()/;[\\\]{}]/;
|
|
611
|
+
|
|
608
612
|
function escapeHTMLInCSS(str) {
|
|
609
613
|
if (typeof str !== 'string') return str
|
|
610
614
|
if (!str.includes('<')) return str
|
|
@@ -633,14 +637,15 @@ function requireStringifier () {
|
|
|
633
637
|
function atruleStart(str, node) {
|
|
634
638
|
let name = '@' + node.name;
|
|
635
639
|
let params = node.params ? str.rawValue(node, 'params') : '';
|
|
640
|
+
let afterName = node.raws.afterName;
|
|
636
641
|
|
|
637
|
-
if (typeof
|
|
638
|
-
|
|
639
|
-
} else if (params) {
|
|
640
|
-
|
|
642
|
+
if (typeof afterName === 'undefined') {
|
|
643
|
+
afterName = params ? ' ' : '';
|
|
644
|
+
} else if (afterName === '' && params && !AT_NAME_END.test(params[0])) {
|
|
645
|
+
afterName = ' ';
|
|
641
646
|
}
|
|
642
647
|
|
|
643
|
-
return name + params
|
|
648
|
+
return name + afterName + params
|
|
644
649
|
}
|
|
645
650
|
|
|
646
651
|
function pushBody(str, stack, node) {
|
|
@@ -654,10 +659,24 @@ function requireStringifier () {
|
|
|
654
659
|
let semicolon = str.raw(node, 'semicolon');
|
|
655
660
|
let isDocument = node.type === 'document';
|
|
656
661
|
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
662
|
+
let child = nodes[i];
|
|
663
|
+
let childSemicolon = last !== i || semicolon;
|
|
664
|
+
// A childless at-rule or a custom property declaration that still has
|
|
665
|
+
// following siblings must be terminated. Without the semicolon those
|
|
666
|
+
// trailing comments are folded into the at-rule's prelude or the custom
|
|
667
|
+
// property's value and disappear when the output is re-parsed.
|
|
668
|
+
if (
|
|
669
|
+
!childSemicolon &&
|
|
670
|
+
i < nodes.length - 1 &&
|
|
671
|
+
((child.type === 'atrule' && !child.nodes) ||
|
|
672
|
+
(child.type === 'decl' && child.prop.startsWith('--')))
|
|
673
|
+
) {
|
|
674
|
+
childSemicolon = true;
|
|
675
|
+
}
|
|
657
676
|
stack.push({
|
|
658
677
|
document: isDocument,
|
|
659
|
-
node:
|
|
660
|
-
semicolon:
|
|
678
|
+
node: child,
|
|
679
|
+
semicolon: childSemicolon
|
|
661
680
|
});
|
|
662
681
|
}
|
|
663
682
|
}
|
|
@@ -1004,6 +1023,9 @@ function requireStringifier () {
|
|
|
1004
1023
|
}
|
|
1005
1024
|
|
|
1006
1025
|
root(node) {
|
|
1026
|
+
if (node.source && node.source.input.hasBOM) {
|
|
1027
|
+
this.builder('\uFEFF', node, 'start');
|
|
1028
|
+
}
|
|
1007
1029
|
this.body(node);
|
|
1008
1030
|
if (node.raws.after) {
|
|
1009
1031
|
let after = node.raws.after;
|
|
@@ -2329,19 +2351,13 @@ function requirePreviousMap () {
|
|
|
2329
2351
|
|
|
2330
2352
|
loadFile(path, cssFile, trusted) {
|
|
2331
2353
|
if (!trusted && !this.unsafeMap) {
|
|
2332
|
-
if (!/\.map$/i.test(path))
|
|
2354
|
+
if (!/\.map$/i.test(path)) return undefined
|
|
2355
|
+
if (!cssFile) return undefined
|
|
2356
|
+
|
|
2357
|
+
let rel = relative(dirname(cssFile), path);
|
|
2358
|
+
if (rel === '..' || rel.startsWith('..' + sep) || isAbsolute(rel)) {
|
|
2333
2359
|
return undefined
|
|
2334
2360
|
}
|
|
2335
|
-
if (cssFile) {
|
|
2336
|
-
let relativePath = relative(dirname(cssFile), path);
|
|
2337
|
-
if (
|
|
2338
|
-
relativePath === '..' ||
|
|
2339
|
-
relativePath.startsWith('..' + sep) ||
|
|
2340
|
-
isAbsolute(relativePath)
|
|
2341
|
-
) {
|
|
2342
|
-
return undefined
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
2361
|
}
|
|
2346
2362
|
this.root = dirname(path);
|
|
2347
2363
|
if (existsSync(path)) {
|
|
@@ -2806,6 +2822,7 @@ function requireList () {
|
|
|
2806
2822
|
},
|
|
2807
2823
|
|
|
2808
2824
|
split(string, separators, last) {
|
|
2825
|
+
if (!string) return []
|
|
2809
2826
|
let array = [];
|
|
2810
2827
|
let current = '';
|
|
2811
2828
|
let split = false;
|
|
@@ -4349,12 +4366,22 @@ function requireWarning () {
|
|
|
4349
4366
|
if (hasRequiredWarning) return warning;
|
|
4350
4367
|
hasRequiredWarning = 1;
|
|
4351
4368
|
|
|
4369
|
+
let Container = requireContainer$1();
|
|
4370
|
+
let { my } = requireSymbols();
|
|
4371
|
+
|
|
4352
4372
|
class Warning {
|
|
4353
4373
|
constructor(text, opts = {}) {
|
|
4354
4374
|
this.type = 'warning';
|
|
4355
4375
|
this.text = text;
|
|
4356
4376
|
|
|
4357
4377
|
if (opts.node && opts.node.source) {
|
|
4378
|
+
if (!opts.node[my]) {
|
|
4379
|
+
// The node comes from another PostCSS copy in node_modules, so it does
|
|
4380
|
+
// not have this copy’s methods. Container#normalize() rebuilds such
|
|
4381
|
+
// nodes on insert, but a node passed straight to Result#warn() never
|
|
4382
|
+
// goes through it.
|
|
4383
|
+
Container.rebuild(opts.node);
|
|
4384
|
+
}
|
|
4358
4385
|
let range = opts.node.rangeBy(opts);
|
|
4359
4386
|
this.line = range.start.line;
|
|
4360
4387
|
this.column = range.start.column;
|
|
@@ -4969,14 +4996,24 @@ function requireLazyResult () {
|
|
|
4969
4996
|
|
|
4970
4997
|
if (visit.iterator !== 0) {
|
|
4971
4998
|
let iterator = visit.iterator;
|
|
4999
|
+
// Advance past the child we just finished visiting. Like
|
|
5000
|
+
// `Container#each`, the index is incremented only after a child has
|
|
5001
|
+
// been fully processed, so a node inserted right after the current
|
|
5002
|
+
// child is not skipped by the `existIndex < index` adjustment in
|
|
5003
|
+
// `Container#insertAfter()` (which would fire exit events too early).
|
|
5004
|
+
if (visit.descending) {
|
|
5005
|
+
visit.descending = false;
|
|
5006
|
+
node.indexes[iterator] += 1;
|
|
5007
|
+
}
|
|
4972
5008
|
let child;
|
|
4973
5009
|
while ((child = node.nodes[node.indexes[iterator]])) {
|
|
4974
|
-
node.indexes[iterator] += 1;
|
|
4975
5010
|
if (!child[isClean]) {
|
|
4976
5011
|
child[isClean] = true;
|
|
5012
|
+
visit.descending = true;
|
|
4977
5013
|
stack.push(toStack(child));
|
|
4978
5014
|
return
|
|
4979
5015
|
}
|
|
5016
|
+
node.indexes[iterator] += 1;
|
|
4980
5017
|
}
|
|
4981
5018
|
visit.iterator = 0;
|
|
4982
5019
|
delete node.indexes[iterator];
|
|
@@ -5014,12 +5051,22 @@ function requireLazyResult () {
|
|
|
5014
5051
|
|
|
5015
5052
|
if (visit.iterator !== 0) {
|
|
5016
5053
|
let iterator = visit.iterator;
|
|
5054
|
+
// Advance past the child we just finished visiting. Like
|
|
5055
|
+
// `Container#each`, the index is incremented only after a child has
|
|
5056
|
+
// been fully processed. Incrementing before (as this loop used to)
|
|
5057
|
+
// makes a node inserted right after the current child get skipped by
|
|
5058
|
+
// the `existIndex < index` adjustment in `Container#insertAfter()`,
|
|
5059
|
+
// which fires exit events before those new siblings are visited.
|
|
5060
|
+
if (visit.descending) {
|
|
5061
|
+
visit.descending = false;
|
|
5062
|
+
visitNode.indexes[iterator] += 1;
|
|
5063
|
+
}
|
|
5017
5064
|
let child;
|
|
5018
5065
|
let descended = false;
|
|
5019
5066
|
while ((child = visitNode.nodes[visitNode.indexes[iterator]])) {
|
|
5020
|
-
visitNode.indexes[iterator] += 1;
|
|
5021
5067
|
if (!child[isClean]) {
|
|
5022
5068
|
child[isClean] = true;
|
|
5069
|
+
visit.descending = true;
|
|
5023
5070
|
stack.push({
|
|
5024
5071
|
eventIndex: 0,
|
|
5025
5072
|
events: getEvents(child),
|
|
@@ -5029,6 +5076,7 @@ function requireLazyResult () {
|
|
|
5029
5076
|
descended = true;
|
|
5030
5077
|
break
|
|
5031
5078
|
}
|
|
5079
|
+
visitNode.indexes[iterator] += 1;
|
|
5032
5080
|
}
|
|
5033
5081
|
if (descended) continue
|
|
5034
5082
|
visit.iterator = 0;
|
|
@@ -5231,7 +5279,7 @@ function requireProcessor () {
|
|
|
5231
5279
|
|
|
5232
5280
|
class Processor {
|
|
5233
5281
|
constructor(plugins = []) {
|
|
5234
|
-
this.version = '8.5.
|
|
5282
|
+
this.version = '8.5.25';
|
|
5235
5283
|
this.plugins = this.normalize(plugins);
|
|
5236
5284
|
}
|
|
5237
5285
|
|