Skip to content

Commit

Permalink
feat: enable importAttributes and explicitResourceManagement for extr…
Browse files Browse the repository at this point in the history
…actor
  • Loading branch information
timofei-iatsenko committed Aug 20, 2024
1 parent 6d00301 commit bf026fe
Show file tree
Hide file tree
Showing 4 changed files with 926 additions and 1,439 deletions.
2 changes: 1 addition & 1 deletion packages/babel-plugin-extract-messages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/traverse": "7.20.12",
"@babel/traverse": "^7.20.12",
"@babel/types": "^7.20.7",
"@lingui/jest-mocks": "*",
"unbuild": "2.0.0"
Expand Down
5 changes: 4 additions & 1 deletion packages/cli/src/api/extractors/babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ const extractor: ExtractorType = {
const parserOptions = ctx.linguiConfig.extractorParserOptions

// https://babeljs.io/docs/en/babel-parser#latest-ecmascript-features
const parserPlugins: ParserPlugin[] = []
const parserPlugins: ParserPlugin[] = [
"importAttributes", // stage3
"explicitResourceManagement", // stage3,
]

if (
[/\.ts$/, /\.mts$/, /\.cts$/, /\.tsx$/].some((r) => filename.match(r))
Expand Down
6 changes: 3 additions & 3 deletions packages/macro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
"babel-plugin-macros": "2 || 3"
},
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/parser": "7.20.15",
"@babel/traverse": "7.20.12",
"@babel/core": "^7.20.12",
"@babel/parser": "^7.20.15",
"@babel/traverse": "^7.20.12",
"@types/babel-plugin-macros": "^2.8.5",
"prettier": "2.8.3",
"tsd": "^0.26.1",
Expand Down
Loading

0 comments on commit bf026fe

Please sign in to comment.