Skip to content

Commit

Permalink
refactor(vite-node): type generation
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 29, 2022
1 parent fc86d07 commit b2362bc
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
1 change: 1 addition & 0 deletions packages/ui/client/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ declare global {
const createApp: typeof import('vue')['createApp']
const createEventHook: typeof import('@vueuse/core')['createEventHook']
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
Expand Down
18 changes: 13 additions & 5 deletions packages/vite-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,38 @@
".": {
"import": "./dist/index.js",
"require": "./dist/index.cjs",
"types": "./index.d.ts"
"types": "./dist/index.d.ts"
},
"./client": {
"import": "./dist/client.js",
"require": "./dist/client.cjs",
"types": "./client.d.ts"
"types": "./dist/client.d.ts"
},
"./server": {
"import": "./dist/server.js",
"require": "./dist/server.cjs",
"types": "./server.d.ts"
"types": "./dist/server.d.ts"
},
"./utils": {
"import": "./dist/utils.js",
"require": "./dist/utils.cjs",
"types": "./utils.d.ts"
"types": "./dist/utils.d.ts"
}
},
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./index.d.ts",
"types": "./dist/index.d.ts",
"bin": {
"vite-node": "./vite-node.mjs"
},
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
},
"scripts": {
"build": "rimraf dist && rollup -c",
"dev": "rollup -c --watch --watch.include=src/**",
Expand Down
3 changes: 2 additions & 1 deletion packages/vite-node/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ export default () => [
{
input: entries,
output: {
dir: process.cwd(),
dir: 'dist',
entryFileNames: '[name].d.ts',
format: 'esm',
},
external,
plugins: [
dts({ respectExternal: true }),
],
onwarn,
},
]
35 changes: 35 additions & 0 deletions packages/vitest/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,35 @@ Repository: git+https://github.com/isaacs/isexe.git
---------------------------------------

## jsonc-parser
License: MIT
By: Microsoft Corporation
Repository: https://github.com/microsoft/node-jsonc-parser

> The MIT License (MIT)
>
> Copyright (c) Microsoft
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
---------------------------------------

## kleur
License: MIT
By: Luke Edwards
Expand Down Expand Up @@ -1443,6 +1472,12 @@ Repository: micromatch/picomatch
---------------------------------------

## pkg-types
License: MIT
Repository: unjs/pkg-types

---------------------------------------

## pretty-format
License: MIT
By: James Kyle
Expand Down

0 comments on commit b2362bc

Please sign in to comment.