@angular/ssr 22.0.4 → 22.1.0-next.1

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.4",
3
+ "version": "22.1.0-next.1",
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.2",
41
- "@angular/compiler": "22.0.2",
42
- "@angular/core": "22.0.2",
43
- "@angular/platform-browser": "22.0.2",
44
- "@angular/platform-server": "22.0.2",
45
- "@angular/router": "22.0.2",
40
+ "@angular/common": "22.1.0-next.1",
41
+ "@angular/compiler": "22.1.0-next.1",
42
+ "@angular/core": "22.1.0-next.1",
43
+ "@angular/platform-browser": "22.1.0-next.1",
44
+ "@angular/platform-server": "22.1.0-next.1",
45
+ "@angular/router": "22.1.0-next.1",
46
46
  "@schematics/angular": "workspace:*",
47
47
  "beasties": "0.4.2"
48
48
  },
@@ -3450,6 +3450,12 @@ function requireParser () {
3450
3450
  }
3451
3451
  }
3452
3452
 
3453
+ function tokensToString(tokens, from, to) {
3454
+ let result = '';
3455
+ for (let i = from; i < to; i++) result += tokens[i][1];
3456
+ return result
3457
+ }
3458
+
3453
3459
  class Parser {
3454
3460
  constructor(input) {
3455
3461
  this.input = input;
@@ -3562,9 +3568,10 @@ function requireParser () {
3562
3568
  if (founded === 2) break
3563
3569
  }
3564
3570
  }
3565
- // If the token is a word, e.g. `!important`, `red` or any other valid property's value.
3566
- // Then we need to return the colon after that word token. [3] is the "end" colon of that word.
3567
- // And because we need it after that one we do +1 to get the next one.
3571
+ // If the token is a word, e.g. `!important`, `red` or any other valid
3572
+ // property's value. Then we need to return the colon after that word
3573
+ // token. [3] is the "end" colon of that word. And because we need it
3574
+ // after that one we do +1 to get the next one.
3568
3575
  throw this.input.error(
3569
3576
  'Missed semicolon',
3570
3577
  token[0] === 'word' ? token[3] + 1 : token[2]
@@ -3637,50 +3644,50 @@ function requireParser () {
3637
3644
  );
3638
3645
  node.source.end.offset++;
3639
3646
 
3640
- while (tokens[0][0] !== 'word') {
3641
- if (tokens.length === 1) this.unknownWord(tokens);
3642
- node.raws.before += tokens.shift()[1];
3647
+ let start = 0;
3648
+ while (tokens[start][0] !== 'word') {
3649
+ if (start === tokens.length - 1) this.unknownWord([tokens[start]]);
3650
+ start++;
3643
3651
  }
3644
- node.source.start = this.getPosition(tokens[0][2]);
3652
+ node.raws.before += tokensToString(tokens, 0, start);
3653
+ node.source.start = this.getPosition(tokens[start][2]);
3645
3654
 
3646
- node.prop = '';
3647
- while (tokens.length) {
3648
- let type = tokens[0][0];
3655
+ let propStart = start;
3656
+ while (start < tokens.length) {
3657
+ let type = tokens[start][0];
3649
3658
  if (type === ':' || type === 'space' || type === 'comment') {
3650
3659
  break
3651
3660
  }
3652
- node.prop += tokens.shift()[1];
3661
+ start++;
3653
3662
  }
3663
+ node.prop = tokensToString(tokens, propStart, start);
3654
3664
 
3655
- node.raws.between = '';
3656
-
3665
+ let betweenStart = start;
3657
3666
  let token;
3658
- while (tokens.length) {
3659
- token = tokens.shift();
3660
-
3661
- if (token[0] === ':') {
3662
- node.raws.between += token[1];
3663
- break
3664
- } else {
3665
- if (token[0] === 'word' && /\w/.test(token[1])) {
3666
- this.unknownWord([token]);
3667
- }
3668
- node.raws.between += token[1];
3667
+ while (start < tokens.length) {
3668
+ token = tokens[start];
3669
+ start++;
3670
+ if (token[0] === ':') break
3671
+ if (token[0] === 'word' && /\w/.test(token[1])) {
3672
+ this.unknownWord([token]);
3669
3673
  }
3670
3674
  }
3675
+ node.raws.between = tokensToString(tokens, betweenStart, start);
3671
3676
 
3672
3677
  if (node.prop[0] === '_' || node.prop[0] === '*') {
3673
3678
  node.raws.before += node.prop[0];
3674
3679
  node.prop = node.prop.slice(1);
3675
3680
  }
3676
3681
 
3677
- let firstSpaces = [];
3678
- let next;
3679
- while (tokens.length) {
3680
- next = tokens[0][0];
3682
+ let firstSpacesStart = start;
3683
+ while (start < tokens.length) {
3684
+ let next = tokens[start][0];
3681
3685
  if (next !== 'space' && next !== 'comment') break
3682
- firstSpaces.push(tokens.shift());
3686
+ start++;
3683
3687
  }
3688
+ let firstSpaces = tokens.slice(firstSpacesStart, start);
3689
+
3690
+ tokens = tokens.slice(start);
3684
3691
 
3685
3692
  this.precheckMissedSemicolon(tokens);
3686
3693
 
@@ -4939,7 +4946,7 @@ function requireProcessor () {
4939
4946
 
4940
4947
  class Processor {
4941
4948
  constructor(plugins = []) {
4942
- this.version = '8.5.14';
4949
+ this.version = '8.5.15';
4943
4950
  this.plugins = this.normalize(plugins);
4944
4951
  }
4945
4952