-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop using experimental syntax to load package version (#2616)
* chore: stop using experimental syntax to load package version The import attribute syntax (`with { type: "json" }`) is still experimental so warnings showed up when using the library as it was being used to import the package.json file to extract the package version As an alternative, the current version will be injected on build time through tsup configuration. * Create healthy-moose-kneel.md * fix: failing test on node v22 after warning format change The test was failing because the line number in one of the warnings being suppressed changed from 5 characters to 7 on node v22. The other rule suppression was removed as a previous commit fixed the undelying issue. --------- Co-authored-by: Felipe Cortés <felipe@cortes.cl> Co-authored-by: Dimitri POSTOLOV <dmytropostolov@gmail.com>
- Loading branch information
1 parent
b916bc9
commit c0f1b07
Showing
4 changed files
with
11 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@graphql-eslint/eslint-plugin": patch | ||
--- | ||
|
||
The import attribute syntax (with { type: "json" }) is still experimental so warnings showed up when using the library as it was being used to import the package.json file to extract the package version | ||
|
||
As an alternative, the current version will be injected on build time through tsup configuration. |
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,3 +1 @@ | ||
import packageJson from '../package.json' with { type: 'json' }; | ||
|
||
export const { version } = packageJson; | ||
export const version = process.env.VERSION |
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