Skip to content

Commit

Permalink
fix: include missing enums when exporting esm/cjs modules
Browse files Browse the repository at this point in the history
  • Loading branch information
weyoss committed Mar 24, 2024
1 parent e72b312 commit 2ee6802
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 23 deletions.
5 changes: 4 additions & 1 deletion .npmignore
@@ -1,5 +1,6 @@
dist/tests
dist/examples
dist/**/tests
examples
src/**
tests/**
Expand All @@ -24,4 +25,6 @@ build
docker-compose.yml
scripts/**
docs/**
.codecov.yml
.codecov.yml
tsconfig*
jest*
8 changes: 4 additions & 4 deletions package-lock.json

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

15 changes: 10 additions & 5 deletions package.json
Expand Up @@ -33,12 +33,17 @@
"type": "module",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/types/index.d.ts",
"types": "./dist/esm/index.d.ts",
"exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
}
},
"./package.json": "./package.json"
},
Expand All @@ -52,7 +57,7 @@
"dependencies": {
"cron-parser": "4.7.1",
"lodash": "4.17.21",
"redis-smq-common": "3.0.0-rc.14",
"redis-smq-common": "3.0.0-rc.15",
"uuid": "9.0.0"
},
"devDependencies": {
Expand Down
3 changes: 0 additions & 3 deletions scripts/build.sh
Expand Up @@ -27,6 +27,3 @@ cat >dist/cjs/package.json <<!EOF
}
!EOF
cp -r src/common/redis-client/scripts/lua dist/cjs/src/common/redis-client/scripts/

# types
tsc -p ./tsconfig.types.json
2 changes: 2 additions & 0 deletions tsconfig.json
Expand Up @@ -14,6 +14,8 @@
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"declarationMap": true,

// esm settings
"outDir": "dist/esm",
Expand Down
10 changes: 0 additions & 10 deletions tsconfig.types.json

This file was deleted.

0 comments on commit 2ee6802

Please sign in to comment.