Skip to content

Commit

Permalink
fix: revert siroc to fix windows error (#356)
Browse files Browse the repository at this point in the history
* fix: use `upath` for better cross-platform support
* chore: revert siroc
  • Loading branch information
danielroe authored Jan 25, 2021
1 parent 2b255f1 commit acdf18d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"dependencies": {
"@vue/composition-api": "1.0.0-rc.1",
"defu": "^3.2.2",
"normalize-path": "^3.0.0"
"upath": "^2.0.1"
},
"devDependencies": {
"@babel/plugin-transform-runtime": "^7.12.10",
Expand Down Expand Up @@ -97,7 +97,7 @@
"nuxt": "^2.14.12",
"prettier": "^2.2.1",
"release-it": "14.2.2",
"siroc": "0.6.3",
"siroc": "0.6.0",
"start-server-and-test": "^1.11.7",
"testcafe": "1.10.1",
"tsd": "^0.14.0",
Expand Down
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { resolve, join } from 'path'
import { resolve, join } from 'upath'
import { readdirSync, copyFileSync, existsSync, mkdirpSync } from 'fs-extra'

import type { Module } from '@nuxt/types'
import normalize from 'normalize-path'

const loadUtils = () => {
try {
Expand All @@ -16,9 +15,7 @@ const loadUtils = () => {

const utils = loadUtils()

const compositionApiModule: Module<any> = function () {
const libRoot = resolve(__dirname, '..')

const compositionApiModule: Module<any> = function compositionApiModule() {
let corejsPolyfill = this.nuxt.options.build.corejs
? String(this.nuxt.options.build.corejs)
: undefined
Expand All @@ -32,6 +29,7 @@ const compositionApiModule: Module<any> = function () {
corejsPolyfill = undefined
}

const libRoot = resolve(__dirname, '..')
const { dst: pluginDst } = this.addTemplate({
src: resolve(libRoot, 'templates', 'plugin.js'),
fileName: join('composition-api', 'plugin.js'),
Expand Down Expand Up @@ -74,8 +72,8 @@ const compositionApiModule: Module<any> = function () {
fileName: join('composition-api', 'index.js'),
options: {
isFullStatic: 'isFullStatic' in utils && utils.isFullStatic(this.options),
staticPath: normalize(staticPath),
publicPath: normalize(join(this.options.router?.base || '', '/')),
staticPath: staticPath,
publicPath: join(this.options.router?.base || '', '/'),
globalContext,
globalNuxt,
},
Expand Down Expand Up @@ -121,7 +119,9 @@ const compositionApiModule: Module<any> = function () {
}

export default compositionApiModule

// eslint-disable-next-line
export const meta = require('../package.json')
// @ts-ignore
compositionApiModule.meta = require('../package.json')

export * from './entrypoint'
45 changes: 20 additions & 25 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@
dependencies:
"@rollup/pluginutils" "^3.0.8"

"@rollup/plugin-node-resolve@^11.1.0":
"@rollup/plugin-node-resolve@^11.0.0":
version "11.1.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.1.0.tgz#fa0f888297b3aebcd6534e8aba4e6fe01997649a"
integrity sha512-ouBBppRdWJKCllDXGzJ7ZIkYbaq+5TmyP0smt1vdJCFfoZhLi31vhpmjLhyo8lreHf4RoeSNllaWrvSqHpHRog==
Expand Down Expand Up @@ -3467,7 +3467,7 @@ bytes@3.1.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==

cac@^6.7.1:
cac@^6.6.1:
version "6.7.1"
resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.1.tgz#0609d28a31d887746de4b66a15e3914f106f880c"
integrity sha512-LfGt47+ugCY65W4yUEyxnZKd/tJSBJD/gUAxQGiQjH7yqdhbaX2XN0Rli4+0W0DJiDONmYeh0TlJxMtXGZspIg==
Expand Down Expand Up @@ -8103,11 +8103,6 @@ jiti@^0.1.16, jiti@^0.1.17:
resolved "https://registry.yarnpkg.com/jiti/-/jiti-0.1.17.tgz#b693a29c94d0ca4f82a4624b40dd9915527416be"
integrity sha512-IlUGuEHKA44dqJoSqpv1poIRyyi31ciEmpLlRZCmo9TasVSZhwfmaVUuQVs26EHuwYdx+NirOm41+wbykH/+9Q==

jiti@^1.2.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.2.1.tgz#e8d31d27e28b66db160da656b7189ee404f406f5"
integrity sha512-boJtKVr/lTSMcRMf845TXfX3EOXbnrWiINgarCeOIifwrjs76g5iq398Qh8dAJiv0BGaHb8AmWjJRAVSuJ0mUQ==

joi@^17.3.0:
version "17.3.0"
resolved "https://registry.yarnpkg.com/joi/-/joi-17.3.0.tgz#f1be4a6ce29bc1716665819ac361dfa139fff5d2"
Expand Down Expand Up @@ -11535,7 +11530,7 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^3.0.0"
inherits "^2.0.1"

rollup-plugin-dts@^2.0.1:
rollup-plugin-dts@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-2.0.1.tgz#333f50a637e199a073d490b198746f3c6bd07701"
integrity sha512-y38NSXIY37YExCumbGBTL5dXg7pL7XD+Kbe98iEHWFN9yiKJf7t4kKBOkml5ylUDjQIXBnNClGDeRktc1T5dmA==
Expand All @@ -11553,10 +11548,10 @@ rollup-plugin-esbuild@2.5.2:
joycon "^2.2.5"
strip-json-comments "^3.1.1"

rollup@^2.36.2:
version "2.37.1"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.37.1.tgz#aa7aadffd75c80393f9314f9857e851b0ffd34e7"
integrity sha512-V3ojEeyGeSdrMSuhP3diBb06P+qV4gKQeanbDv+Qh/BZbhdZ7kHV0xAt8Yjk4GFshq/WjO7R4c7DFM20AwTFVQ==
rollup@^2.34.2:
version "2.38.0"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.38.0.tgz#57942d5a10826cb12ed1f19c261f774efa502d2d"
integrity sha512-ay9zDiNitZK/LNE/EM2+v5CZ7drkB2xyDljvb1fQJCGnq43ZWRkhxN145oV8GmoW1YNi4sA/1Jdkr2LfawJoXw==
optionalDependencies:
fsevents "~2.1.2"

Expand Down Expand Up @@ -11878,30 +11873,30 @@ simple-swizzle@^0.2.2:
dependencies:
is-arrayish "^0.3.1"

siroc@0.6.3:
version "0.6.3"
resolved "https://registry.yarnpkg.com/siroc/-/siroc-0.6.3.tgz#3f5a986ea3f7664be6e82e2413d5ffdb9f98f571"
integrity sha512-9tFbs6lJLQBwJ/5TF26y0aepMVhT0iFm8KqMBpg/XtdoJZoybruHZAE4xzk2YWPM3AAlHZ6/bO/34ZqZKINfTg==
siroc@0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/siroc/-/siroc-0.6.0.tgz#6ec5971a2f2559cf84585db2f61d384899ca2b5b"
integrity sha512-E82fNydB5Fjc3jmBZeR+JrrFSipEODmHZMOPLFtjnyKwNMaEs/geTuAqe9DDzTjdwLeRukaaoSbPg3V0X1TgJA==
dependencies:
"@rollup/plugin-alias" "^3.1.1"
"@rollup/plugin-commonjs" "^17.0.0"
"@rollup/plugin-json" "^4.1.0"
"@rollup/plugin-node-resolve" "^11.1.0"
"@rollup/plugin-node-resolve" "^11.0.0"
"@rollup/plugin-replace" "^2.3.4"
cac "^6.7.1"
cac "^6.6.1"
chalk "^4.1.0"
consola "^2.15.0"
defu "^3.2.2"
esbuild "^0.7.22"
execa "^5.0.0"
fs-extra "^9.0.1"
glob "^7.1.6"
jiti "^1.2.0"
rollup "^2.36.2"
rollup-plugin-dts "^2.0.1"
jiti "^0.1.17"
rollup "^2.34.2"
rollup-plugin-dts "^2.0.0"
rollup-plugin-esbuild "2.5.2"
sort-package-json "^1.48.1"
typescript "^4.1.3"
sort-package-json "^1.48.0"
typescript "^4.1.2"
v8-compile-cache "^2.2.0"

sisteransi@^1.0.5:
Expand Down Expand Up @@ -11986,7 +11981,7 @@ sort-object-keys@^1.1.3:
resolved "https://registry.yarnpkg.com/sort-object-keys/-/sort-object-keys-1.1.3.tgz#bff833fe85cab147b34742e45863453c1e190b45"
integrity sha512-855pvK+VkU7PaKYPc+Jjnmt4EzejQHyhhF33q31qG8x7maDzkeFhAAThdCYay11CISO+qAMwjOBP+fPZe0IPyg==

sort-package-json@^1.48.1:
sort-package-json@^1.48.0:
version "1.48.1"
resolved "https://registry.yarnpkg.com/sort-package-json/-/sort-package-json-1.48.1.tgz#58629823da53a3ccccc049cb7e7300bc23072b33"
integrity sha512-YvDm1iBzhphfXtctTS0XIBlIW/2N1DZNHx3YMcZnptpZhchqH4zazUOuEWmjfNXndwamITMt9hFPliqwx1SHvQ==
Expand Down Expand Up @@ -13148,7 +13143,7 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@4.1.3, typescript@^4.1.3:
typescript@4.1.3, typescript@^4.1.2:
version "4.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
Expand Down

1 comment on commit acdf18d

@vercel
Copy link

@vercel vercel bot commented on acdf18d Jan 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.