Skip to content

Commit

Permalink
Parse Deprecation.forVersion on compiler side
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed May 29, 2024
1 parent 82e1590 commit 359b546
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/src/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export function getDeprecationIds(
): string[] {
return arr.flatMap(item => {
if (item instanceof Version) {
return Object.values(deprecations)
.filter(deprecation => isActiveIn(deprecation, item))
.map(deprecation => deprecation.id);
return arr.map(item => item.toString());
} else if (typeof item === 'string') {
return item;
}
Expand Down
3 changes: 3 additions & 0 deletions lib/src/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ export class Version implements api.Version {
parseInt(match[3])
);
}
toString(): string {
return `${this.major}.${this.minor}.${this.patch}`;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sass-embedded",
"version": "1.77.3",
"protocol-version": "2.7.0",
"protocol-version": "2.7.1",
"compiler-version": "1.77.3",
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",
"repository": "sass/embedded-host-node",
Expand Down

0 comments on commit 359b546

Please sign in to comment.