chore: update to unbuild 0.5.x (#545)

This commit is contained in:
pooya parsa 2021-09-21 18:49:36 +02:00 committed by GitHub
parent 5394aef2f7
commit 62647844b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 77 additions and 76 deletions

View File

@ -16,7 +16,7 @@
"@nuxt/kit": "link:../packages/kit", "@nuxt/kit": "link:../packages/kit",
"@nuxt/typescript-build": "^2.1.0", "@nuxt/typescript-build": "^2.1.0",
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"jiti": "^1.12.0", "jiti": "^1.12.1",
"mkdirp": "^1.0.4", "mkdirp": "^1.0.4",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"scule": "^0.2.1", "scule": "^0.2.1",

View File

@ -24,7 +24,8 @@
"version": "yarn && git add yarn.lock" "version": "yarn && git add yarn.lock"
}, },
"resolutions": { "resolutions": {
"nuxt3": "workspace:./packages/nuxt3" "nuxt3": "workspace:./packages/nuxt3",
"unbuild": "^0.5.2"
}, },
"devDependencies": { "devDependencies": {
"@nuxtjs/eslint-config": "^6.0.1", "@nuxtjs/eslint-config": "^6.0.1",
@ -41,13 +42,13 @@
"eslint-plugin-jsdoc": "^36.1.0", "eslint-plugin-jsdoc": "^36.1.0",
"execa": "^5.1.1", "execa": "^5.1.1",
"globby": "^11.0.4", "globby": "^11.0.4",
"jiti": "^1.12.0", "jiti": "^1.12.1",
"jsdom": "^17.0.0", "jsdom": "^17.0.0",
"lerna": "^4.0.0", "lerna": "^4.0.0",
"mocha": "^9.1.1", "mocha": "^9.1.1",
"object-hash": "^2.2.0", "object-hash": "^2.2.0",
"typescript": "^4.4.3", "typescript": "^4.4.3",
"unbuild": "^0.4.2", "unbuild": "latest",
"upath": "^2.0.1" "upath": "^2.0.1"
}, },
"packageManager": "yarn@3.0.2" "packageManager": "yarn@3.0.2"

View File

@ -3,7 +3,7 @@
"version": "0.0.0", "version": "0.0.0",
"repository": "nuxt/framework", "repository": "nuxt/framework",
"license": "MIT", "license": "MIT",
"main": "./dist/module.js", "main": "./dist/module.cjs",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"files": [ "files": [
"dist" "dist"

View File

@ -3,7 +3,7 @@
"version": "0.10.0", "version": "0.10.0",
"repository": "nuxt/framework", "repository": "nuxt/framework",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.cjs",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"files": [ "files": [
"dist", "dist",
@ -23,7 +23,7 @@
"globby": "^11.0.4", "globby": "^11.0.4",
"hash-sum": "^2.0.0", "hash-sum": "^2.0.0",
"hookable": "^5.0.0", "hookable": "^5.0.0",
"jiti": "^1.12.0", "jiti": "^1.12.1",
"rc9": "^1.2.0", "rc9": "^1.2.0",
"scule": "^0.2.1", "scule": "^0.2.1",
"std-env": "^2.3.0", "std-env": "^2.3.0",

View File

@ -2,7 +2,7 @@
"name": "@nuxt/nitro", "name": "@nuxt/nitro",
"version": "0.10.0", "version": "0.10.0",
"license": "MIT", "license": "MIT",
"main": "dist/index.js", "main": "./dist/index.cjs",
"types": "./types/index.d.ts", "types": "./types/index.d.ts",
"files": [ "files": [
"dist", "dist",
@ -48,7 +48,7 @@
"hookable": "^5.0.0", "hookable": "^5.0.0",
"http-proxy": "^1.18.1", "http-proxy": "^1.18.1",
"is-primitive": "^3.0.1", "is-primitive": "^3.0.1",
"jiti": "^1.12.0", "jiti": "^1.12.1",
"listhen": "^0.2.4", "listhen": "^0.2.4",
"mime": "^2.5.2", "mime": "^2.5.2",
"node-fetch": "^3.0.0", "node-fetch": "^3.0.0",

View File

@ -1,3 +1,4 @@
#!/usr/bin/env node #!/usr/bin/env node
process._startTime = Date.now() process._startTime = Date.now()
require('../dist').main()
require('../dist/index.cjs').main()

View File

@ -3,10 +3,10 @@
"version": "0.10.0", "version": "0.10.0",
"repository": "nuxt/framework", "repository": "nuxt/framework",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.cjs",
"bin": { "bin": {
"nu": "./bin/nuxi.js", "nu": "./bin/nuxi.cjs",
"nuxi": "./bin/nuxi.js" "nuxi": "./bin/nuxi.cjs"
}, },
"scripts": { "scripts": {
"prepack": "unbuild" "prepack": "unbuild"
@ -32,11 +32,11 @@
"deep-object-diff": "^1.1.0", "deep-object-diff": "^1.1.0",
"destr": "^1.1.0", "destr": "^1.1.0",
"flat": "^5.0.2", "flat": "^5.0.2",
"jiti": "^1.12.0", "jiti": "^1.12.1",
"listhen": "^0.2.4", "listhen": "^0.2.4",
"mri": "^1.2.0", "mri": "^1.2.0",
"scule": "^0.2.1", "scule": "^0.2.1",
"unbuild": "^0.4.2", "unbuild": "latest",
"upath": "^2.0.1", "upath": "^2.0.1",
"v8-compile-cache": "^2.3.0" "v8-compile-cache": "^2.3.0"
} }

2
packages/nuxt3/bin/nuxt.cjs Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env node
require('nuxi/bin/nuxi.cjs')

View File

@ -1,2 +0,0 @@
#!/usr/bin/env node
require('nuxi/bin/nuxi')

View File

@ -3,10 +3,10 @@
"version": "0.10.0", "version": "0.10.0",
"repository": "nuxt/framework", "repository": "nuxt/framework",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.cjs",
"types": "./types.d.ts", "types": "./types.d.ts",
"bin": { "bin": {
"nuxt": "./bin/nuxt.js" "nuxt": "./bin/nuxt.cjs"
}, },
"files": [ "files": [
"bin", "bin",
@ -48,7 +48,7 @@
"@types/fs-extra": "^9.0.12", "@types/fs-extra": "^9.0.12",
"@types/hash-sum": "^1.0.0", "@types/hash-sum": "^1.0.0",
"@types/lodash": "^4.14.173", "@types/lodash": "^4.14.173",
"unbuild": "^0.4.2", "unbuild": "latest",
"vue-meta": "next" "vue-meta": "next"
}, },
"peerDependencies": { "peerDependencies": {

View File

@ -3,7 +3,7 @@
"version": "0.10.0", "version": "0.10.0",
"repository": "nuxt/framework", "repository": "nuxt/framework",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.cjs",
"files": [ "files": [
"dist" "dist"
], ],

View File

@ -3,7 +3,7 @@
"version": "0.10.0", "version": "0.10.0",
"repository": "nuxt/framework", "repository": "nuxt/framework",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.cjs",
"files": [ "files": [
"dist" "dist"
], ],

View File

@ -11,7 +11,7 @@ export default class NuxtSetupTransformerPlugin {
enforce: 'post', enforce: 'post',
use: [{ use: [{
ident: 'NuxtSetupTransformerPlugin', ident: 'NuxtSetupTransformerPlugin',
loader: normalize(require.resolve('@nuxt/webpack-builder/dist/nuxt-setup-loader')) loader: normalize(require.resolve('@nuxt/webpack-builder/dist/nuxt-setup-loader.cjs'))
}] }]
}) })
} }

View File

@ -27,7 +27,7 @@ export function setupTest (preset) {
it('nitro build', async () => { it('nitro build', async () => {
const nuxtCLI = isBridge const nuxtCLI = isBridge
? resolve(ctx.rootDir, 'node_modules/nuxt/bin/nuxt.js') ? resolve(ctx.rootDir, 'node_modules/nuxt/bin/nuxt.js')
: resolveWorkspace('packages/nuxi/bin/nuxi.js') : resolveWorkspace('packages/nuxi/bin/nuxi.cjs')
await execa('node', [nuxtCLI, 'build', ctx.rootDir], { await execa('node', [nuxtCLI, 'build', ctx.rootDir], {
env: { env: {

View File

@ -17,7 +17,7 @@ export function fixtureDir (name) {
} }
export async function execNuxtCLI (args, opts) { export async function execNuxtCLI (args, opts) {
const nuxtCLI = resolveWorkspace('packages/nuxi/bin/nuxi.js') const nuxtCLI = resolveWorkspace('packages/nuxi/bin/nuxi.cjs')
await execa('node', [nuxtCLI, ...args], opts) await execa('node', [nuxtCLI, ...args], opts)
} }

101
yarn.lock
View File

@ -14,7 +14,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.14.5": "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.14.5":
version: 7.14.5 version: 7.14.5
resolution: "@babel/code-frame@npm:7.14.5" resolution: "@babel/code-frame@npm:7.14.5"
dependencies: dependencies:
@ -1466,7 +1466,7 @@ __metadata:
globby: ^11.0.4 globby: ^11.0.4
hash-sum: ^2.0.0 hash-sum: ^2.0.0
hookable: ^5.0.0 hookable: ^5.0.0
jiti: ^1.12.0 jiti: ^1.12.1
rc9: ^1.2.0 rc9: ^1.2.0
scule: ^0.2.1 scule: ^0.2.1
std-env: ^2.3.0 std-env: ^2.3.0
@ -1522,7 +1522,7 @@ __metadata:
hookable: ^5.0.0 hookable: ^5.0.0
http-proxy: ^1.18.1 http-proxy: ^1.18.1
is-primitive: ^3.0.1 is-primitive: ^3.0.1
jiti: ^1.12.0 jiti: ^1.12.1
listhen: ^0.2.4 listhen: ^0.2.4
mime: ^2.5.2 mime: ^2.5.2
node-fetch: ^3.0.0 node-fetch: ^3.0.0
@ -1823,23 +1823,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@rollup/plugin-commonjs@npm:^19.0.1":
version: 19.0.2
resolution: "@rollup/plugin-commonjs@npm:19.0.2"
dependencies:
"@rollup/pluginutils": ^3.1.0
commondir: ^1.0.1
estree-walker: ^2.0.1
glob: ^7.1.6
is-reference: ^1.2.1
magic-string: ^0.25.7
resolve: ^1.17.0
peerDependencies:
rollup: ^2.38.3
checksum: bf60da71b12c1c52fc2ca223272a1b5a4c27e47f707077024338f841b97f5656c352a3c2c11dd6a5fec0d63ae53407b9ceab72b87dda5701ddffdc09bba34513
languageName: node
linkType: hard
"@rollup/plugin-commonjs@npm:^20.0.0": "@rollup/plugin-commonjs@npm:^20.0.0":
version: 20.0.0 version: 20.0.0
resolution: "@rollup/plugin-commonjs@npm:20.0.0" resolution: "@rollup/plugin-commonjs@npm:20.0.0"
@ -6019,7 +6002,7 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"esbuild@npm:^0.12.16, esbuild@npm:^0.12.17, esbuild@npm:^0.12.21, esbuild@npm:^0.12.28, esbuild@npm:^0.12.9": "esbuild@npm:^0.12.17, esbuild@npm:^0.12.21, esbuild@npm:^0.12.28, esbuild@npm:^0.12.9":
version: 0.12.28 version: 0.12.28
resolution: "esbuild@npm:0.12.28" resolution: "esbuild@npm:0.12.28"
bin: bin:
@ -8173,7 +8156,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"jiti@npm:^1.10.1, jiti@npm:^1.11.0, jiti@npm:^1.12.0": "jiti@npm:^1.10.1, jiti@npm:^1.12.0":
version: 1.12.0 version: 1.12.0
resolution: "jiti@npm:1.12.0" resolution: "jiti@npm:1.12.0"
bin: bin:
@ -8182,6 +8165,15 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"jiti@npm:^1.12.1":
version: 1.12.1
resolution: "jiti@npm:1.12.1"
bin:
jiti: bin/jiti.js
checksum: 173a018877ee43aba95aa7bc026ebed8dbef8a832206de30a35a1c6397cc75446ba42252b2ebfce05a88a5fbbe50ef8af60c399087b1a97ef85c87380e7b761b
languageName: node
linkType: hard
"joycon@npm:^3.0.1": "joycon@npm:^3.0.1":
version: 3.0.1 version: 3.0.1
resolution: "joycon@npm:3.0.1" resolution: "joycon@npm:3.0.1"
@ -9754,19 +9746,19 @@ fsevents@~2.3.2:
destr: ^1.1.0 destr: ^1.1.0
flat: ^5.0.2 flat: ^5.0.2
fsevents: ~2.3.2 fsevents: ~2.3.2
jiti: ^1.12.0 jiti: ^1.12.1
listhen: ^0.2.4 listhen: ^0.2.4
mri: ^1.2.0 mri: ^1.2.0
scule: ^0.2.1 scule: ^0.2.1
unbuild: ^0.4.2 unbuild: latest
upath: ^2.0.1 upath: ^2.0.1
v8-compile-cache: ^2.3.0 v8-compile-cache: ^2.3.0
dependenciesMeta: dependenciesMeta:
fsevents: fsevents:
optional: true optional: true
bin: bin:
nu: ./bin/nuxi.js nu: ./bin/nuxi.cjs
nuxi: ./bin/nuxi.js nuxi: ./bin/nuxi.cjs
languageName: unknown languageName: unknown
linkType: soft linkType: soft
@ -9788,13 +9780,13 @@ fsevents@~2.3.2:
eslint-plugin-jsdoc: ^36.1.0 eslint-plugin-jsdoc: ^36.1.0
execa: ^5.1.1 execa: ^5.1.1
globby: ^11.0.4 globby: ^11.0.4
jiti: ^1.12.0 jiti: ^1.12.1
jsdom: ^17.0.0 jsdom: ^17.0.0
lerna: ^4.0.0 lerna: ^4.0.0
mocha: ^9.1.1 mocha: ^9.1.1
object-hash: ^2.2.0 object-hash: ^2.2.0
typescript: ^4.4.3 typescript: ^4.4.3
unbuild: ^0.4.2 unbuild: latest
upath: ^2.0.1 upath: ^2.0.1
languageName: unknown languageName: unknown
linkType: soft linkType: soft
@ -9866,7 +9858,7 @@ fsevents@~2.3.2:
ohmyfetch: ^0.3.1 ohmyfetch: ^0.3.1
scule: ^0.2.1 scule: ^0.2.1
ufo: ^0.7.9 ufo: ^0.7.9
unbuild: ^0.4.2 unbuild: latest
unplugin: ^0.2.11 unplugin: ^0.2.11
upath: ^2.0.1 upath: ^2.0.1
vue: ^3.2.12 vue: ^3.2.12
@ -9878,7 +9870,7 @@ fsevents@~2.3.2:
"@vue/shared": 3.2.12 "@vue/shared": 3.2.12
vue: 3.2.12 vue: 3.2.12
bin: bin:
nuxt: ./bin/nuxt.js nuxt: ./bin/nuxt.cjs
languageName: unknown languageName: unknown
linkType: soft linkType: soft
@ -12027,19 +12019,19 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"rollup-plugin-dts@npm:^3.0.2": "rollup-plugin-dts@npm:^4.0.0":
version: 3.0.2 version: 4.0.0
resolution: "rollup-plugin-dts@npm:3.0.2" resolution: "rollup-plugin-dts@npm:4.0.0"
dependencies: dependencies:
"@babel/code-frame": ^7.12.13 "@babel/code-frame": ^7.14.5
magic-string: ^0.25.7 magic-string: ^0.25.7
peerDependencies: peerDependencies:
rollup: ^2.48.0 rollup: ^2.56.3
typescript: ^4.2.4 typescript: ^4.4.2
dependenciesMeta: dependenciesMeta:
"@babel/code-frame": "@babel/code-frame":
optional: true optional: true
checksum: c37acf3744fd0a8b8b6fa9dd2be67b05412ad55f6133e98a1fdb5d44beda5a94a32582c622c35af70d0787713c85ecbbb2c06070845b0f93e4705c32289fc48a checksum: b8c74e892d4131da769389549ea6591fd6e6fe4ee480806d01d3d8cd300b278983afa11dcfd93a7c9de5a08352a9a0d321d98e76b00b3b2fa2a3f369971629f1
languageName: node languageName: node
linkType: hard linkType: hard
@ -13369,7 +13361,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"typescript@^4.3.5, typescript@^4.4.3": typescript@^4.4.3:
version: 4.4.3 version: 4.4.3
resolution: "typescript@npm:4.4.3" resolution: "typescript@npm:4.4.3"
bin: bin:
@ -13379,7 +13371,7 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"typescript@patch:typescript@^4.3.5#~builtin<compat/typescript>, typescript@patch:typescript@^4.4.3#~builtin<compat/typescript>": "typescript@patch:typescript@^4.4.3#~builtin<compat/typescript>":
version: 4.4.3 version: 4.4.3
resolution: "typescript@patch:typescript@npm%3A4.4.3#~builtin<compat/typescript>::version=4.4.3&hash=32657b" resolution: "typescript@patch:typescript@npm%3A4.4.3#~builtin<compat/typescript>::version=4.4.3&hash=32657b"
bin: bin:
@ -13431,34 +13423,34 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"unbuild@npm:^0.4.2": "unbuild@npm:^0.5.2":
version: 0.4.2 version: 0.5.2
resolution: "unbuild@npm:0.4.2" resolution: "unbuild@npm:0.5.2"
dependencies: dependencies:
"@rollup/plugin-alias": ^3.1.4 "@rollup/plugin-alias": ^3.1.4
"@rollup/plugin-commonjs": ^19.0.1 "@rollup/plugin-commonjs": ^20.0.0
"@rollup/plugin-json": ^4.1.0 "@rollup/plugin-json": ^4.1.0
"@rollup/plugin-node-resolve": ^13.0.2 "@rollup/plugin-node-resolve": ^13.0.2
chalk: ^4.1.1 chalk: ^4.1.1
consola: ^2.15.3 consola: ^2.15.3
defu: ^5.0.0 defu: ^5.0.0
esbuild: ^0.12.16 esbuild: ^0.12.28
jiti: ^1.11.0 jiti: ^1.12.0
mkdirp: ^1.0.4 mkdirp: ^1.0.4
mkdist: ^0.3.3 mkdist: ^0.3.3
mri: ^1.1.6 mri: ^1.2.0
pretty-bytes: ^5.6.0 pretty-bytes: ^5.6.0
rimraf: ^3.0.2 rimraf: ^3.0.2
rollup: ^2.55.0 rollup: ^2.55.0
rollup-plugin-dts: ^3.0.2 rollup-plugin-dts: ^4.0.0
rollup-plugin-esbuild: ^4.5.0 rollup-plugin-esbuild: ^4.5.0
scule: ^0.2.1 scule: ^0.2.1
typescript: ^4.3.5 typescript: ^4.4.3
untyped: ^0.2.8 untyped: ^0.2.9
upath: ^2.0.1 upath: ^2.0.1
bin: bin:
unbuild: bin/unbuild.js unbuild: bin/unbuild.cjs
checksum: c21e40225b73ded9ccd5893e4af9d7c5ce984d025b2732cbfd95a8c2969ae33a9e1a0351fd84d0e24fe1b4206bc0fbebab83b938afe90cafae0abf197f5250b4 checksum: f1fca31861c44c24bea1d6626842980550d94c34c2cf3c3e827ac5f8c2bde5227e1e68d4aaed6af11815ec04be44b5343f22a6581f33bb4fb139f9f86454ed41
languageName: node languageName: node
linkType: hard linkType: hard
@ -13592,6 +13584,13 @@ fsevents@~2.3.2:
languageName: node languageName: node
linkType: hard linkType: hard
"untyped@npm:^0.2.9":
version: 0.2.9
resolution: "untyped@npm:0.2.9"
checksum: 43a0312451644240bc4f1f4b7c8edd66edb62b34cec121017f33f1f27b8b088a43171d9d66563b74fa627feac9952862385d76a4cc15d6dad81ccec09d56f448
languageName: node
linkType: hard
"upath@npm:^2.0.1": "upath@npm:^2.0.1":
version: 2.0.1 version: 2.0.1
resolution: "upath@npm:2.0.1" resolution: "upath@npm:2.0.1"