-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(language-service): allow native esm to import package (#1122)
with this patch, `@tailwindcss/language-service` can be imported/used in Node.js in native esm mode. adjusted "semver" imports to include an extension, as that package has no "exports". also upgrade semver to latest stable (7.7.1) --------- Co-authored-by: Jordan Pittman <jordan@cryptica.me>
- Loading branch information
1 parent
3277fa3
commit bdd9605
Showing
4 changed files
with
25 additions
and
34 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
import semverGte from 'semver/functions/gte' | ||
import semverLte from 'semver/functions/lte' | ||
import semverGte from 'semver/functions/gte.js' | ||
import semverLte from 'semver/functions/lte.js' | ||
|
||
export function gte(v1: string, v2: string): boolean { | ||
if (v1.startsWith('0.0.0-insiders')) { | ||
return true | ||
} | ||
|
||
return semverGte(v1, v2) | ||
} | ||
|
||
export function lte(v1: string, v2: string): boolean { | ||
if (v1.startsWith('0.0.0-insiders')) { | ||
return false | ||
} | ||
|
||
return semverLte(v1, v2) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.