vendor: support native TypeScript source loading
This commit is contained in:
1
vendor/schemastery/package.json
vendored
1
vendor/schemastery/package.json
vendored
@@ -3,6 +3,7 @@
|
||||
"description": "Type driven schema validator",
|
||||
"version": "3.18.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "lib/index.cjs",
|
||||
"module": "lib/index.mjs",
|
||||
"types": "lib/types/index.d.ts",
|
||||
|
||||
4
vendor/schemastery/src/index.ts
vendored
4
vendor/schemastery/src/index.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { Binary, clone, deepEqual, Dict, filterKeys, isNullable, isPlainObject, pick, valueMap } from 'cosmokit'
|
||||
import { Binary, clone, deepEqual, filterKeys, isNullable, isPlainObject, pick, valueMap, type Dict } from 'cosmokit'
|
||||
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
||||
|
||||
const kSchema = Symbol.for('schemastery')
|
||||
@@ -899,4 +899,4 @@ defineMethod('intersect', ['list'], ({ list }) => {
|
||||
|
||||
defineMethod('transform', ['inner', 'callback', 'preserve'], ({ inner }, isInner) => inner!.toString(isInner))
|
||||
|
||||
export = Schema
|
||||
export default Schema
|
||||
|
||||
7
vendor/schemastery/tsdown.config.ts
vendored
7
vendor/schemastery/tsdown.config.ts
vendored
@@ -1,10 +1,9 @@
|
||||
import { defineConfig } from 'tsdown'
|
||||
|
||||
/**
|
||||
* schemastery has no `"type": "module"` and publishes dual-format output
|
||||
* (package.json: main → lib/index.cjs, module → lib/index.mjs). The entry is
|
||||
* the JS emitted by tsc under lib/types; pin the bundled extensions
|
||||
* explicitly because the defaults for a CommonJS package would emit .mjs/.js.
|
||||
* Schemastery publishes dual-format output (package.json: main → lib/index.cjs,
|
||||
* module → lib/index.mjs). The entry is the JS emitted by tsc under lib/types;
|
||||
* pin the bundled extensions explicitly so the package retains both formats.
|
||||
*/
|
||||
export default defineConfig({
|
||||
entry: ['lib/types/index.js'],
|
||||
|
||||
Reference in New Issue
Block a user