-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
37 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@clober/v2-sdk", | ||
"version": "0.0.2-a", | ||
"version": "0.0.3", | ||
"description": "🛠 An SDK for building applications on top of Clober V2", | ||
"files": [ | ||
"dist" | ||
|
@@ -25,9 +25,10 @@ | |
"docs": "typedoc --out docs src/index.ts --sort kind", | ||
"test": "vitest --root test --config vitest.config.ts --max-concurrency=0", | ||
"clean": "rm -rf dist", | ||
"build": "npm run clean && npm run build:cjs && npm run build:esm+types", | ||
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --outDir ./dist/cjs && echo > ./dist/cjs/package.json '{\"type\":\"commonjs\"}'", | ||
"build:esm+types": "tsc --project tsconfig.build.json --module es2020 --outDir ./dist/esm --declaration --declarationMap --declarationDir ./dist/types && echo > ./dist/esm/package.json '{\"type\":\"module\"}'" | ||
"build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:types", | ||
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --outDir ./dist/cjs --removeComments && printf '{\"type\":\"commonjs\"}' > ./dist/cjs/package.json", | ||
"build:esm": "tsc --project tsconfig.build.json --module es2015 --outDir ./dist/esm && printf '{\"type\": \"module\",\"sideEffects\":false}' > ./dist/esm/package.json", | ||
"build:types": "tsc --project tsconfig.build.json --module esnext --outDir ./dist/types --declarationDir ./dist/types --emitDeclarationOnly --declaration --declarationMap" | ||
}, | ||
"keywords": [], | ||
"author": "Clober<[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,44 @@ | ||
{ | ||
// This tsconfig file contains the shared config for the build (tsconfig.build.json) and type checking (tsconfig.json) config. | ||
"include": [], | ||
"compilerOptions": { | ||
// Incremental builds | ||
// NOTE: Enabling incremental builds speeds up `tsc`. Keep in mind though that it does not reliably bust the cache when the `tsconfig.json` file changes. | ||
"incremental": true, | ||
|
||
// Type checking | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"useDefineForClassFields": true, | ||
"useDefineForClassFields": true, // Not enabled by default in `strict` mode unless we bump `target` to ES2022. | ||
"noFallthroughCasesInSwitch": true, // Not enabled by default in `strict` mode. | ||
"noImplicitReturns": true, // Not enabled by default in `strict` mode. | ||
"useUnknownInCatchVariables": true, // TODO: This would normally be enabled in `strict` mode but would require some adjustments to the codebase. | ||
"noImplicitOverride": true, // Not enabled by default in `strict` mode. | ||
"noUnusedLocals": true, // Not enabled by default in `strict` mode. | ||
"noUnusedParameters": true, // Not enabled by default in `strict` mode. | ||
"exactOptionalPropertyTypes": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitOverride": true, | ||
"noImplicitReturns": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"noUncheckedIndexedAccess": true, | ||
|
||
// Modules | ||
"module": "ES2022", | ||
"moduleResolution": "node", | ||
// TODO: Uncomment and fix types. | ||
// "noUncheckedIndexedAccess": true, | ||
|
||
// JavaScript support | ||
"allowJs": false, | ||
"checkJs": false, | ||
|
||
// Interop constraints | ||
"esModuleInterop": false, | ||
"allowSyntheticDefaultImports": false, | ||
"forceConsistentCasingInFileNames": true, | ||
"importHelpers": true, // This is only used for build validation. Since we do not have `tslib` installed, this will fail if we accidentally make use of anything that'd require injection of helpers. | ||
|
||
// Language and environment | ||
"lib": ["ESNext"], | ||
"target": "ESNext", | ||
"moduleResolution": "NodeNext", | ||
"module": "NodeNext", | ||
"target": "ES2021", // Setting this to `ES2021` enables native support for `Node v16+`: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping. | ||
"lib": [ | ||
"ES2022", // By using ES2022 we get access to the `.cause` property on `Error` instances. | ||
"DOM" // We are adding `DOM` here to get the `fetch`, etc. types. This should be removed once these types are available via DefinitelyTyped. | ||
], | ||
|
||
// Sourcemaps | ||
"sourceMap": true | ||
// Skip type checking for node modules | ||
"skipLibCheck": true, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
{ | ||
// This file is used to compile the for cjs and esm (see package.json build scripts). It should exclude all test files. | ||
"extends": "./tsconfig.base.json", | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["src/**/*.test.ts"], | ||
"compilerOptions": { | ||
"types": ["node"], | ||
"lib": ["DOM"] | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"rootDir": "./src" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters