@angular/ssr 22.0.0 → 22.1.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.0.0",
3
+ "version": "22.1.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",
29
- "@angular/core": "^22.0.0",
30
- "@angular/platform-server": "^22.0.0",
31
- "@angular/router": "^22.0.0"
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"
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.0.0",
41
- "@angular/compiler": "22.0.0",
42
- "@angular/core": "22.0.0",
43
- "@angular/platform-browser": "22.0.0",
44
- "@angular/platform-server": "22.0.0",
45
- "@angular/router": "22.0.0",
40
+ "@angular/common": "22.1.0-next.0",
41
+ "@angular/compiler": "22.1.0-next.0",
42
+ "@angular/core": "22.1.0-next.0",
43
+ "@angular/platform-browser": "22.1.0-next.0",
44
+ "@angular/platform-server": "22.1.0-next.0",
45
+ "@angular/router": "22.1.0-next.0",
46
46
  "@schematics/angular": "workspace:*",
47
47
  "beasties": "0.4.2"
48
48
  },
@@ -407,7 +407,7 @@ function getAugmentedNamespace(n) {
407
407
  var isInstance = false;
408
408
  try {
409
409
  isInstance = this instanceof a;
410
- } catch {}
410
+ } catch (e) {}
411
411
  if (isInstance) {
412
412
  return Reflect.construct(f, arguments, this.constructor);
413
413
  }
@@ -3460,6 +3460,12 @@ function requireParser () {
3460
3460
  }
3461
3461
  }
3462
3462
 
3463
+ function tokensToString(tokens, from, to) {
3464
+ let result = '';
3465
+ for (let i = from; i < to; i++) result += tokens[i][1];
3466
+ return result
3467
+ }
3468
+
3463
3469
  class Parser {
3464
3470
  constructor(input) {
3465
3471
  this.input = input;
@@ -3572,9 +3578,10 @@ function requireParser () {
3572
3578
  if (founded === 2) break
3573
3579
  }
3574
3580
  }
3575
- // If the token is a word, e.g. `!important`, `red` or any other valid property's value.
3576
- // Then we need to return the colon after that word token. [3] is the "end" colon of that word.
3577
- // And because we need it after that one we do +1 to get the next one.
3581
+ // If the token is a word, e.g. `!important`, `red` or any other valid
3582
+ // property's value. Then we need to return the colon after that word
3583
+ // token. [3] is the "end" colon of that word. And because we need it
3584
+ // after that one we do +1 to get the next one.
3578
3585
  throw this.input.error(
3579
3586
  'Missed semicolon',
3580
3587
  token[0] === 'word' ? token[3] + 1 : token[2]
@@ -3647,50 +3654,50 @@ function requireParser () {
3647
3654
  );
3648
3655
  node.source.end.offset++;
3649
3656
 
3650
- while (tokens[0][0] !== 'word') {
3651
- if (tokens.length === 1) this.unknownWord(tokens);
3652
- node.raws.before += tokens.shift()[1];
3657
+ let start = 0;
3658
+ while (tokens[start][0] !== 'word') {
3659
+ if (start === tokens.length - 1) this.unknownWord([tokens[start]]);
3660
+ start++;
3653
3661
  }
3654
- node.source.start = this.getPosition(tokens[0][2]);
3662
+ node.raws.before += tokensToString(tokens, 0, start);
3663
+ node.source.start = this.getPosition(tokens[start][2]);
3655
3664
 
3656
- node.prop = '';
3657
- while (tokens.length) {
3658
- let type = tokens[0][0];
3665
+ let propStart = start;
3666
+ while (start < tokens.length) {
3667
+ let type = tokens[start][0];
3659
3668
  if (type === ':' || type === 'space' || type === 'comment') {
3660
3669
  break
3661
3670
  }
3662
- node.prop += tokens.shift()[1];
3671
+ start++;
3663
3672
  }
3673
+ node.prop = tokensToString(tokens, propStart, start);
3664
3674
 
3665
- node.raws.between = '';
3666
-
3675
+ let betweenStart = start;
3667
3676
  let token;
3668
- while (tokens.length) {
3669
- token = tokens.shift();
3670
-
3671
- if (token[0] === ':') {
3672
- node.raws.between += token[1];
3673
- break
3674
- } else {
3675
- if (token[0] === 'word' && /\w/.test(token[1])) {
3676
- this.unknownWord([token]);
3677
- }
3678
- node.raws.between += token[1];
3677
+ while (start < tokens.length) {
3678
+ token = tokens[start];
3679
+ start++;
3680
+ if (token[0] === ':') break
3681
+ if (token[0] === 'word' && /\w/.test(token[1])) {
3682
+ this.unknownWord([token]);
3679
3683
  }
3680
3684
  }
3685
+ node.raws.between = tokensToString(tokens, betweenStart, start);
3681
3686
 
3682
3687
  if (node.prop[0] === '_' || node.prop[0] === '*') {
3683
3688
  node.raws.before += node.prop[0];
3684
3689
  node.prop = node.prop.slice(1);
3685
3690
  }
3686
3691
 
3687
- let firstSpaces = [];
3688
- let next;
3689
- while (tokens.length) {
3690
- next = tokens[0][0];
3692
+ let firstSpacesStart = start;
3693
+ while (start < tokens.length) {
3694
+ let next = tokens[start][0];
3691
3695
  if (next !== 'space' && next !== 'comment') break
3692
- firstSpaces.push(tokens.shift());
3696
+ start++;
3693
3697
  }
3698
+ let firstSpaces = tokens.slice(firstSpacesStart, start);
3699
+
3700
+ tokens = tokens.slice(start);
3694
3701
 
3695
3702
  this.precheckMissedSemicolon(tokens);
3696
3703
 
@@ -4949,7 +4956,7 @@ function requireProcessor () {
4949
4956
 
4950
4957
  class Processor {
4951
4958
  constructor(plugins = []) {
4952
- this.version = '8.5.14';
4959
+ this.version = '8.5.15';
4953
4960
  this.plugins = this.normalize(plugins);
4954
4961
  }
4955
4962