Skip to content

Commit

Permalink
✏️ fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed May 18, 2024
1 parent d2f1853 commit 8e61fad
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 126 deletions.
14 changes: 5 additions & 9 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"version": "0.0.0",
"packageManager": "pnpm@7.33.0",
"description": "todo",
"keywords": [
"vsit"
],
"keywords": ["vsit"],
"license": "MIT",
"engines": {
"node": ">=16"
Expand Down Expand Up @@ -36,13 +34,13 @@
"exports": {
"./package.json": "./package.json",
"./constants": {
"require": "./dist/constants.cjs",
"import": "./dist/constants.mjs",
"require": "./dist/constants.cjs",
"types": "./dts/exports/constants.d.ts"
}
},
"scripts": {
"build:dts": "rimraf dts && ttsc",
"build:dts": "rimraf dts && tspc",
"build:lib": "rimraf dist && rollup -c --silent --environment BUILD:production",
"build": "run-s build:*",
"dev": "rollup -c"
Expand All @@ -63,16 +61,14 @@
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-node-externals": "5.1.2",
"rollup-plugin-size": "^0.3.1",
"ttypescript": "^1.5.15",
"ts-patch": "^3.1.2",
"typescript": "5.1.6",
"typescript-transform-paths": "^3.4.6",
"vitest": "^0.22.1"
},
"typesVersions": {
"*": {
"constants": [
"dts/exports/constants.d.ts"
]
"constants": ["dts/exports/constants.d.ts"]
}
}
}
3 changes: 1 addition & 2 deletions packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true
"skipLibCheck": true
},
"include": ["src"]
}
20 changes: 9 additions & 11 deletions packages/vsit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"version": "0.2.1",
"packageManager": "pnpm@7.33.0",
"description": "todo",
"keywords": [
"vsit"
],
"keywords": ["vsit"],
"license": "MIT",
"engines": {
"node": ">=16"
Expand Down Expand Up @@ -37,23 +35,23 @@
"exports": {
"./package.json": "./package.json",
".": {
"browser": {
"require": "./dist/browser.cjs",
"import": "./dist/browser.mjs",
"types": "./dts/exports/browser.d.ts"
},
"node": {
"require": "./dist/node.cjs",
"import": "./dist/node.mjs",
"require": "./dist/node.cjs",
"types": "./dts/exports/node.d.ts"
},
"browser": {
"import": "./dist/browser.mjs",
"require": "./dist/browser.cjs",
"types": "./dts/exports/browser.d.ts"
}
}
},
"main": "dist/node.cjs",
"module": "dist/node.mjs",
"types": "dts/exports/node.d.ts",
"scripts": {
"build:dts": "rimraf dts && ttsc -p tsconfig.dts.json",
"build:dts": "rimraf dts && tspc -p tsconfig.dts.json",
"build:lib": "rimraf dist && rollup -c --silent --environment BUILD:production",
"build": "run-s build:*",
"dev": "rollup -c -w",
Expand Down Expand Up @@ -110,7 +108,7 @@
"rollup-plugin-size": "^0.3.1",
"source-map-support": "^0.5.21",
"tempy": "^3.1.0",
"ttypescript": "^1.5.15",
"ts-patch": "^3.1.2",
"type-fest": "^3.12.0",
"typescript": "5.1.6",
"typescript-transform-paths": "^3.4.6",
Expand Down
3 changes: 2 additions & 1 deletion packages/vsit/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ const commands = {

const cli = cac('vsit').version(version)

const handler = (cmdName: string) => {
const handler = (cmdName: 'main') => {
return async function (...args: any[]) {
const cmd = await commands[cmdName]()
// @ts-expect-error -- ignore
await cmd(...args)
}
}
Expand Down
3 changes: 2 additions & 1 deletion packages/vsit/src/common/consolehook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ let length = methods.length
const consolehook: Console = {} as Console

while (length--) {
method = methods[length]
method = methods[length] as keyof Console

// Only stub undefined methods.
if (!consolehook[method]) {
// @ts-expect-error -- ignore
consolehook[method] = noop
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vsit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"ignoreDeprecations": "5.0",
"plugins": [
{ "transform": "typescript-transform-paths" },
{
Expand Down
132 changes: 31 additions & 101 deletions pnpm-lock.yaml

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

0 comments on commit 8e61fad

Please sign in to comment.