@angular/ssr 22.1.0-rc.0 → 22.2.0-next.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/ssr",
3
- "version": "22.1.0-rc.0",
3
+ "version": "22.2.0-next.0",
4
4
  "description": "Angular server side rendering utilities",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -25,10 +25,10 @@
25
25
  "tslib": "^2.3.0"
26
26
  },
27
27
  "peerDependencies": {
28
- "@angular/common": "^22.0.0 || ^22.1.0-next.0",
29
- "@angular/core": "^22.0.0 || ^22.1.0-next.0",
30
- "@angular/platform-server": "^22.0.0 || ^22.1.0-next.0",
31
- "@angular/router": "^22.0.0 || ^22.1.0-next.0"
28
+ "@angular/common": "^22.0.0 || ^22.2.0-next.0",
29
+ "@angular/core": "^22.0.0 || ^22.2.0-next.0",
30
+ "@angular/platform-server": "^22.0.0 || ^22.2.0-next.0",
31
+ "@angular/router": "^22.0.0 || ^22.2.0-next.0"
32
32
  },
33
33
  "peerDependenciesMeta": {
34
34
  "@angular/platform-server": {
@@ -37,12 +37,12 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@angular-devkit/schematics": "workspace:*",
40
- "@angular/common": "22.1.0-rc.0",
41
- "@angular/compiler": "22.1.0-rc.0",
42
- "@angular/core": "22.1.0-rc.0",
43
- "@angular/platform-browser": "22.1.0-rc.0",
44
- "@angular/platform-server": "22.1.0-rc.0",
45
- "@angular/router": "22.1.0-rc.0",
40
+ "@angular/common": "22.2.0-next.0",
41
+ "@angular/compiler": "22.2.0-next.0",
42
+ "@angular/core": "22.2.0-next.0",
43
+ "@angular/platform-browser": "22.2.0-next.0",
44
+ "@angular/platform-server": "22.2.0-next.0",
45
+ "@angular/router": "22.2.0-next.0",
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 node.raws.afterName !== 'undefined') {
638
- name += node.raws.afterName;
639
- } else if (params) {
640
- name += ' ';
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: nodes[i],
660
- semicolon: last !== i || 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)) {
@@ -4349,12 +4365,22 @@ function requireWarning () {
4349
4365
  if (hasRequiredWarning) return warning;
4350
4366
  hasRequiredWarning = 1;
4351
4367
 
4368
+ let Container = requireContainer$1();
4369
+ let { my } = requireSymbols();
4370
+
4352
4371
  class Warning {
4353
4372
  constructor(text, opts = {}) {
4354
4373
  this.type = 'warning';
4355
4374
  this.text = text;
4356
4375
 
4357
4376
  if (opts.node && opts.node.source) {
4377
+ if (!opts.node[my]) {
4378
+ // The node comes from another PostCSS copy in node_modules, so it does
4379
+ // not have this copy’s methods. Container#normalize() rebuilds such
4380
+ // nodes on insert, but a node passed straight to Result#warn() never
4381
+ // goes through it.
4382
+ Container.rebuild(opts.node);
4383
+ }
4358
4384
  let range = opts.node.rangeBy(opts);
4359
4385
  this.line = range.start.line;
4360
4386
  this.column = range.start.column;
@@ -5231,7 +5257,7 @@ function requireProcessor () {
5231
5257
 
5232
5258
  class Processor {
5233
5259
  constructor(plugins = []) {
5234
- this.version = '8.5.19';
5260
+ this.version = '8.5.24';
5235
5261
  this.plugins = this.normalize(plugins);
5236
5262
  }
5237
5263