Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion build.js → build.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ esbuild
bundle: true,
entryPoints: ['./src/index.ts'],
external: ['@babel/runtime', 'isomorphic-fetch', 'graphql-request'],
format: 'cjs',
format: 'esm',
logLevel: 'info',
metafile: true,
minify: true,
Expand Down
File renamed without changes.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@
"version": "1.1.0",
"description": "TypeScript client for Weaviate",
"main": "dist/index.js",
"types": "types/index.d.ts",
"types": "dist/index.d.ts",
"type": "module",
"engines": {
"node": ">=16.0.0"
},
"files": [
"/dist/index.js",
"/dist/index.js.map",
"/types/**/*.d.ts"
"/dist/**/*.d.ts"
],
"scripts": {
"test": "tsc -noEmit -p tsconfig-test.json && jest --useStderr --runInBand --detectOpenHandles",
"build": "npm run lint && tsc --emitDeclarationOnly && ./build.js",
"build": "npm run lint && tsc --emitDeclarationOnly && ./build.cjs",
"prepack": "npm run build",
"lint": "eslint --ext .ts,.js .",
"lint": "eslint --ext .ts,.js,.cjs .",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write --no-error-on-unmatched-pattern '**/*.{ts,js}' '!dist/**' '!types/**'",
"format:check": "prettier --check --no-error-on-unmatched-pattern '**/*.{ts,js}' '!dist/**' '!types/**'",
"format": "prettier --write --no-error-on-unmatched-pattern '**/*.{ts,js,cjs}' '!dist/**' '!types/**'",
"format:check": "prettier --check --no-error-on-unmatched-pattern '**/*.{ts,js,cjs}' '!dist/**' '!types/**'",
"prepare": "husky install"
},
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ function initDbVersionProvider(conn: Connection) {
return dbVersionProvider;
}

module.exports = app;
export default app;
export * from './openapi/types';
export * from './graphql';
export * from './schema';
Expand All @@ -105,3 +103,4 @@ export * from './c11y';
export * from './backup';
export * from './cluster';
export * from './connection';
export default app;
5 changes: 2 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@
"allowJs": true,
"checkJs": false,
"sourceMap": false,
"module": "commonjs",
"module": "ES2020",
"moduleResolution": "node",
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"outDir": "./types",
"outDir": "./dist",
"declaration": true,
"rootDir": "./src",
"types": ["node"]
},
"include": ["./src/**/*"],
"exclude": ["**/*.test.ts"]
Expand Down