Skip to content

Commit

Permalink
Moved shim exports to top level instead of nested folder, to make typ…
Browse files Browse the repository at this point in the history
…es import possible without dist
  • Loading branch information
oskardudycz committed Aug 8, 2024
1 parent d55f2fa commit 992f2a4
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@event-driven-io/pongo-core",
"version": "0.12.3",
"version": "0.12.4",
"description": "Pongo - Mongo with strong consistency on top of Postgres",
"type": "module",
"engines": {
Expand Down
12 changes: 6 additions & 6 deletions src/packages/pongo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@event-driven-io/pongo",
"version": "0.12.3",
"version": "0.12.4",
"description": "Pongo - Mongo with strong consistency on top of Postgres",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -41,12 +41,12 @@
},
"./shim": {
"import": {
"types": "./dist/shim/index.d.ts",
"default": "./dist/shim/index.js"
"types": "./dist/shim.d.ts",
"default": "./dist/shim.js"
},
"require": {
"types": "./dist/shim/index.d.cts",
"default": "./dist/shim/index.cjs"
"types": "./dist/shim.d.cts",
"default": "./dist/shim.cjs"
}
}
},
Expand All @@ -56,7 +56,7 @@
"./dist/index.d.ts"
],
"shim": [
"./dist/shim/index.d.ts"
"./dist/shim.d.ts"
]
}
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/packages/pongo/src/shim.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './mongo';
2 changes: 1 addition & 1 deletion src/packages/pongo/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default defineConfig({
watch: env === 'development',
target: 'esnext',
outDir: 'dist', //env === 'production' ? 'dist' : 'lib',
entry: ['src/index.ts', 'src/shim/index.ts'],
entry: ['src/index.ts', 'src/shim.ts'],
//entry: ['src/**/*.ts', '!src/**/*.spec.ts', '!src/**/*.internal.ts'], //include all files under src but not specs
sourcemap: true,
tsconfig: 'tsconfig.build.json', // workaround for https://github.com/egoist/tsup/issues/571#issuecomment-1760052931
Expand Down

0 comments on commit 992f2a4

Please sign in to comment.