Skip to content

Commit

Permalink
Revision 0.32.1 (#701)
Browse files Browse the repository at this point in the history
* Ensure Package Specifies Default Import as Last Key

* TypeScript 5.3.3
  • Loading branch information
sinclairzx81 authored Dec 23, 2023
1 parent ca4000c commit ca4d771
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 17 deletions.
39 changes: 30 additions & 9 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sinclair/typebox",
"version": "0.32.0",
"version": "0.32.1",
"description": "Json Schema Type Builder with Static Type Resolution for TypeScript",
"keywords": [
"typescript",
Expand Down Expand Up @@ -37,6 +37,6 @@
"ajv-formats": "^2.1.1",
"mocha": "^9.2.2",
"prettier": "^2.7.1",
"typescript": "^5.3.2"
"typescript": "^5.3.3"
}
}
14 changes: 8 additions & 6 deletions task/build/redirect/create-package-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ function resolvePackageJson(submodules: string[]) {
function resolveSubmoduleExports(submodule: string) {
return {
require: {
types: `./build/require/${submodule}/index.d.ts`,
default: `./build/require/${submodule}/index.js`,
types: `./build/require/${submodule}/index.d.ts`
},
import: {
default: `./build/import/${submodule}/index.mjs`,
types: `./build/import/${submodule}/index.d.mts`,
default: `./build/import/${submodule}/index.mjs`,

}
}
}
Expand All @@ -65,12 +66,13 @@ function resolveExports(submodules: string[]) {
// ... and root module
".": {
"require": {
"types": "./build/require/index.d.ts",
"default": "./build/require/index.js",
"types": "./build/require/index.d.ts"

},
"import": {
"types": "./build/import/index.d.mts",
"default": "./build/import/index.mjs",
"types": "./build/import/index.d.mts"
}
}
})
Expand All @@ -89,8 +91,8 @@ function resolveMetadata() {
license: packageJson.license,
repository: packageJson.repository,
scripts: { test: 'echo test' }, // flagged by socket.dev
module: "./build/import/index.mjs",
types: "./build/require/index.d.ts",
main: "./build/require/index.js"
main: "./build/require/index.js",
module: "./build/import/index.mjs",
}
}

0 comments on commit ca4d771

Please sign in to comment.