Skip to content

Commit

Permalink
chore: export * does not work anymore in deepkit/core
Browse files Browse the repository at this point in the history
we get errors like     packages/framework/src/debug/media.controller.ts:14:25 - error TS2305: Module '"@deepkit/core"' has no exported member 'pathJoin'.

but only in ts-jest. it works correctly in tsc build.
explicitly exporting via names "fixes" it.
  • Loading branch information
marcj committed Oct 22, 2023
1 parent 5f5c087 commit 6e6162d
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 20 deletions.
6 changes: 5 additions & 1 deletion packages/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ export * from './src/reflection.js';
export * from './src/url.js';
export * from './src/array.js';
export * from './src/types.js';
export * from './src/path.js';

// export * does not work for some reason
// we get: packages/framework/src/debug/media.controller.ts:14:25 - error TS2305: Module '"@deepkit/core"' has no exported member 'pathJoin'.
// exporting it explicitly works.
export { pathDirectory, pathJoin, pathExtension, pathNormalize, pathBasename } from './src/path.js';
1 change: 0 additions & 1 deletion packages/core/src/path.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/**
* Normalizes the given path.
* Removes duplicate slashes, removes trailing slashes, adds a leading slash.
Expand Down
1 change: 0 additions & 1 deletion packages/filesystem-aws-s3/tests/filesystem.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { expect, test } from '@jest/globals';
import './filesystem.spec.js';
import { adapterFactory, setAdapterFactory } from '@deepkit/filesystem/test';
import { FilesystemAwsS3Adapter } from '../src/s3-adapter.js';
import { DeleteObjectsCommand, ListObjectsCommand } from '@aws-sdk/client-s3';
Expand Down
1 change: 0 additions & 1 deletion packages/filesystem-ftp/tests/filesystem.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { test } from '@jest/globals';
import './filesystem.spec.js';
import { setAdapterFactory } from '@deepkit/filesystem/test';
import { FilesystemFtpAdapter } from '../src/ftp-adapter.js';
import { platform } from 'os';
Expand Down
1 change: 0 additions & 1 deletion packages/filesystem-google/tests/filesystem.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { test } from '@jest/globals';
import './filesystem.spec.js';
import { Filesystem } from '@deepkit/filesystem';
import { adapterFactory, setAdapterFactory } from '@deepkit/filesystem/test';
import { FilesystemGoogleAdapter } from '../src/google-adapter.js';
Expand Down
1 change: 0 additions & 1 deletion packages/filesystem-sftp/tests/filesystem.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { test } from '@jest/globals';
import './storage.spec.js';
import { setAdapterFactory } from '@deepkit/filesystem/test';
import { FilesystemSftpAdapter } from '../src/sftp-adapter.js';
import { platform } from 'os';
Expand Down
2 changes: 1 addition & 1 deletion packages/framework/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"preserveSymlinks": true,
"target": "es2018",
"module": "CommonJS",
"skipLibCheck": true,
"esModuleInterop": true,
"outDir": "./dist/cjs",
"declaration": true,
Expand All @@ -24,7 +25,6 @@
"src",
"jsx",
"tests",
"benchmark",
"index.ts",
"jsx-runtime.ts",
"loader.ts"
Expand Down
17 changes: 4 additions & 13 deletions packages/orm-browser/package-lock.json

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

1 change: 1 addition & 0 deletions packages/orm-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@deepkit/orm": "^1.0.1-alpha.102",
"@deepkit/rpc": "^1.0.1-alpha.102",
"@deepkit/type": "^1.0.1-alpha.102",
"@types/node": "20.6.0",
"rxjs": "~7.5.0"
},
"jest": {
Expand Down

0 comments on commit 6e6162d

Please sign in to comment.