forked from ember-template-lint/ember-template-recast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously a node was cloned with `JSON.parse(JSON.stringify(node))`. This approach needs to be sophisticated because the node.loc property has been changed from a plain JSON object to a `SourceSpan` instance in in v0.66.0 of @glimmer/syntax. (See PR 1170 in https://github.com/glimmerjs/glimmer-vm if you want to take a look at the changes in @glimmer/syntax.) node.loc in v0.65.4 has the following interface: ``` export interface SourceLocation { source?: Option<string>; start: Position; end: Position; } ``` reference: https://github.com/glimmerjs/glimmer-vm/blob/v0.65.4/packages/%40glimmer/syntax/lib/types/nodes.ts#L36-L40 in v0.80.0, node.loc is an instance of SourceSpan, which is defined here: https://github.com/glimmerjs/glimmer-vm/blob/v0.80.0/packages/%40glimmer/syntax/lib/source/loc/span.ts#L106-L309
- Loading branch information
Showing
3 changed files
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters