Skip to content

Commit

Permalink
chore: enabled json imports (#30223)
Browse files Browse the repository at this point in the history
  • Loading branch information
RahulGautamSingh committed Jul 17, 2024
1 parent 4b50202 commit 2dfc542
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/expose.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

/**
* returns renovates package.json
* @type {import('./types').RenovatePackageJson}
*/
const pkg = (() => require('../package.json'))();
const path = (() => require('path'))();
// need to use dynamic strings so that typescript does not include package.json in dist folder after compilation
const filePath = path.join(__dirname, '..', 'package.json');
const pkg = (() => require(filePath))();

/**
* return's re2
Expand Down
1 change: 0 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "./tsconfig",
"compilerOptions": {
"declaration": true,
"resolveJsonModule": false,
"sourceMap": true,
"inlineSources": true,
"importHelpers": true,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"resolveJsonModule": false,
"resolveJsonModule": true,
"noUnusedLocals": true,
"noImplicitOverride": true,
"experimentalDecorators": true,
Expand Down

0 comments on commit 2dfc542

Please sign in to comment.