Skip to content

Commit

Permalink
fix(nuxt): use @nuxt/kit (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Nov 3, 2021
1 parent 9598134 commit 3d6d3cb
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 25 deletions.
6 changes: 6 additions & 0 deletions packages/nuxt/module.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// CommonJS proxy to bypass jiti transforms from nuxt 2 and using native ESM
module.exports = function(...args) {
return import('./dist/module.mjs').then(m => m.default.call(this, ...args))
}

module.exports.meta = require('./package.json')
12 changes: 6 additions & 6 deletions packages/nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
"sideEffects": false,
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
"import": "./dist/module.mjs",
"require": "./module.cjs"
},
"./dist/templates/*": "./dist/templates/*",
"./templates/*": "./dist/templates/*"
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"main": "./module.cjs",
"types": "./dist/module.d.ts",
"files": [
"module.cjs",
"dist/*.js",
"dist/*.mjs",
"dist/*.d.ts",
Expand All @@ -47,7 +47,7 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l @pinia/nuxt -r 1"
},
"dependencies": {
"@nuxt/kit": "npm:@nuxt/kit-edge@latest",
"@nuxt/kit": "latest",
"vue-demi": "*"
},
"devDependencies": {
Expand Down
File renamed without changes.
49 changes: 30 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1433,10 +1433,10 @@
node-gyp "^7.1.0"
read-package-json-fast "^2.0.1"

"@nuxt/kit@npm:@nuxt/kit-edge@latest":
version "3.0.0-27258294.bdbfa36"
resolved "https://registry.yarnpkg.com/@nuxt/kit-edge/-/kit-edge-3.0.0-27258294.bdbfa36.tgz#87edc2f66efe686181b9cddcdfbe0e64f168a120"
integrity sha512-1gNOk3kDNHbe1DXBaiSd8jEUCuB9tDguTsfw6t/4/cQSt/pLX6udApNxD/aMY2MWj7Oav6/6G/25X1uQqDsC9Q==
"@nuxt/kit-edge@latest":
version "3.0.0-27265876.3cd4494"
resolved "https://registry.yarnpkg.com/@nuxt/kit-edge/-/kit-edge-3.0.0-27265876.3cd4494.tgz#3375d07f032a41ae6b58dc3725fae15ef5a76234"
integrity sha512-69oWKZiHPajONbxf4lPJdMp3Y6MlGmArVn283mlevv7jblrhQmEDDQrcfW7BIvuJ2athhfk7g8L9Ase0I1qIKg==
dependencies:
consola "^2.15.3"
create-require "^1.1.1"
Expand All @@ -1447,16 +1447,24 @@
hookable "^5.0.0"
jiti "^1.12.9"
lodash.template "^4.5.0"
mlly "^0.3.9"
mlly "^0.3.12"
pathe "^0.2.0"
pkg-types "^0.3.1"
rc9 "^1.2.0"
scule "^0.2.1"
semver "^7.3.5"
std-env "^2.3.1"
std-env "^3.0.0"
ufo "^0.7.9"
unctx "^1.0.2"
untyped "^0.2.10"
untyped "^0.2.11"

"@nuxt/kit@latest":
version "0.7.0-edge"
resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-0.7.0-edge.tgz#37da0dda70b76f9df054708ea3c066d60689f811"
integrity sha512-3+azijGDlERcmhK/Gp97cn8+I++/pn/AmYcj7ceRF++6T86ohckAY0ip/+y4dLlWJ0AGnwB6x4gybG03ltEPew==
dependencies:
"@nuxt/kit-edge" latest
jiti "^1.12.9"

"@nuxt/types@^2.15.8":
version "2.15.8"
Expand Down Expand Up @@ -2825,7 +2833,7 @@ ci-info@^2.0.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==

ci-info@^3.1.1, ci-info@^3.2.0:
ci-info@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6"
integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==
Expand Down Expand Up @@ -5848,7 +5856,12 @@ mkdist@^0.3.3:
mri "^1.2.0"
pathe "^0.2.0"

mlly@^0.3.6, mlly@^0.3.9:
mlly@^0.3.12:
version "0.3.12"
resolved "https://registry.yarnpkg.com/mlly/-/mlly-0.3.12.tgz#9928d517622558ea6ce3d5544df1a4f7c6687811"
integrity sha512-+5DdpxP48PpfV/FcP4j/8TREPycnROCg0hX1nmD6aoZ2lD4FpZI4sxWG6l6YpUktXi/vckj8NaAl3DVQSkIn3w==

mlly@^0.3.6:
version "0.3.10"
resolved "https://registry.yarnpkg.com/mlly/-/mlly-0.3.10.tgz#cf3353565c84e951311c46c8d2c8b320d90f9eb3"
integrity sha512-vD3A7naDtIOqHYZhnYUrECRO6UODWNqz6T0TS/pxwolzVoWKX/mXJF1XSM3qxruCDtkzJbzJPgesByihY/r3EA==
Expand Down Expand Up @@ -7383,12 +7396,10 @@ stack-utils@^2.0.3:
dependencies:
escape-string-regexp "^2.0.0"

std-env@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/std-env/-/std-env-2.3.1.tgz#d42271908819c243f8defc77a140fc1fcee336a1"
integrity sha512-eOsoKTWnr6C8aWrqJJ2KAReXoa7Vn5Ywyw6uCXgA/xDhxPoaIsBa5aNJmISY04dLwXPBnDHW4diGM7Sn5K4R/g==
dependencies:
ci-info "^3.1.1"
std-env@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.0.0.tgz#8dbd16bd2aadc18992072e2f5839e897f4ee2733"
integrity sha512-GoFEqAGzhaexp/T01rIiLOK9LHa6HmVwEUyeU4cwdSnOhfxpw9IMeAFi44SHWbCErEs29qEh7vAOUbtUmoycjA==

stream-events@^1.0.5:
version "1.0.5"
Expand Down Expand Up @@ -7958,10 +7969,10 @@ universalify@^2.0.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==

untyped@^0.2.10:
version "0.2.10"
resolved "https://registry.yarnpkg.com/untyped/-/untyped-0.2.10.tgz#daee5d2b94ff5040be251077e9ddb91732017ac1"
integrity sha512-Ym1bZHJK3rE7n6WYVlIQPOkpCtkWcZbiy0obnmQ0Pn7a82lJVXWgyLhKE1XSyCvmg3HvEQW8kgHAE+r17G4l2Q==
untyped@^0.2.11:
version "0.2.11"
resolved "https://registry.yarnpkg.com/untyped/-/untyped-0.2.11.tgz#a956977e82ad1186232995bc4ba4b68ae7d20b26"
integrity sha512-KVNcu9jB+mlnQJiunAzmqpnnn9R+yniT+AkOk9ZgCIsThwh0nlP6wO+O7mJjHM7Y2yplEu3v6NNtRvb82+uGxw==

upath@^2.0.1:
version "2.0.1"
Expand Down

0 comments on commit 3d6d3cb

Please sign in to comment.