Skip to content

Commit

Permalink
Fix package.json exports (#258)
Browse files Browse the repository at this point in the history
* Fix package.json exports

* Apply suggestions from code review

Co-authored-by: Itamar Gronich <[email protected]>

---------

Co-authored-by: Itamar Gronich <[email protected]>
  • Loading branch information
lucaong and ItamarGronich authored May 7, 2024
1 parent dd76533 commit ef74099
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
"type": "module",
"exports": {
".": {
"types": "./dist/types/index.d.ts",
"require": "./dist/cjs/index.cjs",
"import": "./dist/es/index.js",
"default": "./dist/es/index.js"
},
"./SearchableMap": {
"types": "./dist/types/SearchableMap.d.ts",
"require": "./dist/cjs/SearchableMap.cjs",
"import": "./dist/es/SearchableMap.js",
"default": "./dist/es/SearchableMap.js"
}
},
Expand Down Expand Up @@ -58,7 +58,7 @@
"jest": "^29.3.1",
"regenerator-runtime": "^0.14.0",
"rollup": "^4.1.0",
"rollup-plugin-dts": "^6.0.0",
"rollup-plugin-dts": "^6.1.0",
"snazzy": "^9.0.0",
"ts-jest": "^29.0.3",
"tslib": "^2.0.1",
Expand Down
6 changes: 4 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export default process.env.BENCHMARKS === 'true' ? [benchmarks] : [
config({ format: 'umd', input: 'src/SearchableMap/SearchableMap.ts', output: 'umd', name: 'MiniSearch' }),

// Type declarations
config({ format: 'es', input: 'src/index.ts', output: 'dts', dir: 'types', extension: 'd.ts' }),
config({ format: 'es', input: 'src/SearchableMap/SearchableMap.ts', output: 'dts', dir: 'types', extension: 'd.ts' })
config({ format: 'es', input: 'src/index.ts', output: 'dts', extension: 'd.ts' }),
config({ format: 'es', input: 'src/SearchableMap/SearchableMap.ts', output: 'dts', extension: 'd.ts' }),
config({ format: 'cjs', input: 'src/index.ts', output: 'dts', extension: 'd.cts' }),
config({ format: 'cjs', input: 'src/SearchableMap/SearchableMap.ts', output: 'dts', extension: 'd.cts' })
]
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2910,9 +2910,9 @@ lunr@^2.3.9:
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==

magic-string@^0.30.4:
version "0.30.5"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.5.tgz#1994d980bd1c8835dc6e78db7cbd4ae4f24746f9"
integrity sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==
version "0.30.8"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.8.tgz#14e8624246d2bedba70d5462aa99ac9681844613"
integrity sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==
dependencies:
"@jridgewell/sourcemap-codec" "^1.4.15"

Expand Down Expand Up @@ -3342,7 +3342,7 @@ rimraf@^3.0.2:
dependencies:
glob "^7.1.3"

rollup-plugin-dts@^6.0.0:
rollup-plugin-dts@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-6.1.0.tgz#56e9c5548dac717213c6a4aa9df523faf04f75ae"
integrity sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==
Expand Down

0 comments on commit ef74099

Please sign in to comment.