Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/esm #57

Merged
merged 2 commits into from
Jun 19, 2024
Merged
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
37 changes: 23 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,47 @@
"[email protected]"
],
"license": "MIT",
"main": "build/lib/index.js",
"main": "dist/cjs/lib/index.js",
"module": "dist/esm/lib/index.js",
"files": [
"build/lib",
"build/generated"
"dist"
],
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/esm/lib/index.js",
"require": "./dist/cjs/lib/index.js"
}
},
"scripts": {
"test": "jest --runInBand --no-cache",
"test:cov": "npm run test && coveralls < coverage/lcov.info",
"prebuild": "rimraf build",
"prebuild": "rimraf dist",
"build": "tsc",
"postbuild": "esm2cjs --in dist/esm --out dist/cjs -l error",
"generate": "./scripts/generate.sh"
},
"dependencies": {
"@grpc/grpc-js": "^1.10.4",
"@grpc/grpc-js": "^1.10.9",
"deepmerge": "^4.3.1",
"log4js": "^6.9.1",
"protobufjs": "^7.2.6"
"protobufjs": "^7.3.2"
},
"devDependencies": {
"@alcalzone/esm2cjs": "^1.1.2",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.30",
"coveralls-next": "^4.2.0",
"glob": "^10.3.10",
"googleapis": "^134.0.0",
"@types/node": "^20.14.5",
"coveralls-next": "^4.2.1",
"glob": "^10.4.2",
"googleapis": "^140.0.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"rimraf": "^5.0.5",
"ts-jest": "^29.1.2",
"rimraf": "^5.0.7",
"ts-jest": "^29.1.5",
"ts-node": "^10.9.2",
"ts-proto": "^1.170.0",
"typescript": "5.4.3"
"ts-proto": "^1.180.0",
"typescript": "5.4.5"
},
"publishConfig": {
"access": "public",
Expand Down
11 changes: 6 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */

/* Language and Environment */
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"lib": ["ESNext"], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
Expand All @@ -25,9 +25,9 @@
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */

/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "ESNext", /* Specify what module code is generated. */
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
"moduleResolution": "Node", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
Expand All @@ -49,7 +49,7 @@
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
"outDir": "build", /* Specify an output folder for all emitted files. */
"outDir": "dist/esm", /* Specify an output folder for all emitted files. */
// "removeComments": true, /* Disable emitting comments. */
// "noEmit": true, /* Disable emitting files from a compilation. */
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
Expand Down Expand Up @@ -103,4 +103,5 @@
"include": [
"src"
],
"exclude": ["src/tests"]
}
Loading
Loading