Skip to content

Commit

Permalink
optimize TypeScript V4 export
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Nov 28, 2023
1 parent 7df42ed commit 036e26e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 23.7.7

- optimize TypeScript V4 export

## 23.7.6

- types: CustomInstanceExtenstions
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"typescript": "4.9.3"
},
"dependencies": {
"i18next": "23.7.5"
"i18next": "23.7.7"
}
}
2 changes: 1 addition & 1 deletion examples/typescript/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"target": "es6",
"lib": ["es2015"],
"jsx": "react",
"moduleResolution": "Classic",
"moduleResolution": "Node",
// "moduleResolution": "NodeNext",
"forceConsistentCasingInFileNames": true,
"sourceMap": true,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
"tdd": "karma start karma.conf.js",
"tdd:compat": "karma start karma.backward.conf.js",
"build": "rimraf dist && rollup -c && echo '{\"type\":\"module\"}' > dist/esm/package.json && cpy \"./dist/umd/*.js\" ./",
"generate_ts_v4_index": "cp index.d.ts index.v4.d.ts && node -e \"fs.writeFileSync('index.v4.d.ts', fs.readFileSync('index.v4.d.ts').toString().replace(/.js'/g, '.d.ts\\''))\"",
"__nerate_ts_v4_index": "cp index.d.ts index.v4.d.ts && node -e \"fs.writeFileSync('index.v4.d.ts', fs.readFileSync('index.v4.d.ts').toString().replace(/.js'/g, '.d.ts\\''))\"",
"generate_ts_v4_index": "cp index.d.ts index.v4.d.ts && node -e \"fs.writeFileSync('index.v4.d.ts', fs.readFileSync('index.v4.d.ts').toString().replace(/t.js/g, 't.v4.js').replace(/export type \\* /g, '// export type * '))\"",
"fix_dist_package": "node -e 'console.log(`{\"type\":\"module\",\"version\":\"${process.env.npm_package_version}\"}`)' > dist/esm/package.json",
"preversion": "npm run test && npm run build && git push",
"postversion": "npm run fix_dist_package && git push && git push --tags && npm run release",
Expand Down
2 changes: 1 addition & 1 deletion typescript/options.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { $MergeBy, $PreservedValue, $Dictionary } from './helpers.d.ts';
import type { $MergeBy, $PreservedValue, $Dictionary } from './helpers.js';

/**
* This interface can be augmented by users to add types to `i18next` default TypeOptions.
Expand Down

0 comments on commit 036e26e

Please sign in to comment.