-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(cdk/schematics): handle templates with byte order mark #27131
Conversation
Fixes that migrations may throw a "Character out of bounds" error if a template is using BOM. Fixes angular#27057.
@@ -155,7 +155,7 @@ export class ComponentResourceCollector { | |||
return; | |||
} | |||
|
|||
const fileContent = this._fileSystem.read(templatePath); | |||
const fileContent = stripBom(this._fileSystem.read(templatePath) || ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just fyi: need to be very careful here. It depends on the virtual tree and update recorder, whether they auto-insert the BOM offset or not. I just remember some issues there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured it would be okay since it fixed the error and we've had that call for CSS files for a long time now.
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`16.0.1` -> `16.0.3`](https://renovatebot.com/diffs/npm/@angular%2fcdk/16.0.1/16.0.3) | | [@angular/material](https://github.com/angular/components) | dependencies | patch | [`16.0.1` -> `16.0.3`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/16.0.1/16.0.3) | --- ### Release Notes <details> <summary>angular/components</summary> ### [`v16.0.3`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#​1603-silk-scarf-2023-06-01) [Compare Source](angular/components@16.0.2...16.0.3) ##### cdk | Commit | Type | Description | | -- | -- | -- | | [3d4a9d1607](angular/components@3d4a9d1) | fix | **overlay:** remove circular dependency workarounds ([#​27190](angular/components#27190)) | ##### material | Commit | Type | Description | | -- | -- | -- | | [c8065d5168](angular/components@c8065d5) | fix | **chips:** fix click target when stacked ([#​27129](angular/components#27129)) | | [12e47478c5](angular/components@12e4747) | fix | **slider:** handle ngModel initial null value ([#​27149](angular/components#27149)) | <!-- CHANGELOG SPLIT MARKER --> ### [`v16.0.2`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#​1602-plastic-car-2023-05-25) [Compare Source](angular/components@16.0.1...16.0.2) ##### cdk | Commit | Type | Description | | -- | -- | -- | | [a0aa14fe1a](angular/components@a0aa14f) | fix | **schematics:** handle templates with byte order mark ([#​27131](angular/components#27131)) | ##### material | Commit | Type | Description | | -- | -- | -- | | [82550af4d7](angular/components@82550af) | fix | **checkbox:** set token values on the element where theme is [@​included](https://github.com/included) ([#​27114](angular/components#27114)) | | [d2e8a55b3b](angular/components@d2e8a55) | fix | **core:** Fix MacOS Hover feature compatibility with optgroup ([#​27081](angular/components#27081)) | | [6dd2c605b1](angular/components@6dd2c60) | fix | **datepicker:** set explicit event options ([#​27082](angular/components#27082)) | | [5c3107ccc6](angular/components@5c3107c) | fix | **icon:** harness returning wrong name if icon has other content ([#​27132](angular/components#27132)) | | [9d9ceb2b22](angular/components@9d9ceb2) | fix | **list:** input coercion does not working for `disableRipple` on list items ([#​27126](angular/components#27126)) | | [5aad5df78e](angular/components@5aad5df) | fix | **paginator:** add aria-hidden="true" to decorative svg's ([#​27083](angular/components#27083)) | ##### multiple | Commit | Type | Description | | -- | -- | -- | | [12474aafc5](angular/components@12474aa) | fix | set aria-hidden on presentational svgs ([#​27116](angular/components#27116)) | <!-- CHANGELOG SPLIT MARKER --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMTEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjExMS4wIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCJ9--> Co-authored-by: cabr2-bot <[email protected]> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1918 Reviewed-by: Epsilon_02 <[email protected]> Co-authored-by: Calciumdibromid Bot <[email protected]> Co-committed-by: Calciumdibromid Bot <[email protected]>
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes that migrations may throw a "Character out of bounds" error if a template is using BOM.
Fixes #27057.