From c84de99102ceda9461bf6e0883f28fa25ee03db2 Mon Sep 17 00:00:00 2001 From: patak Date: Mon, 7 Nov 2022 09:35:36 +0100 Subject: [PATCH] feat: rollup 3 (#9870) Co-authored-by: bluwy --- package.json | 2 +- packages/plugin-vue/package.json | 2 +- playground/vitestSetup.ts | 2 +- scripts/rollupLicensePlugin.mjs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 4ae32724..446dba49 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "prompts": "^2.4.2", "resolve": "^1.22.1", "rimraf": "^3.0.2", - "rollup": "^2.79.1", + "rollup": "~3.2.3", "rollup-plugin-license": "^2.9.0", "semver": "^7.3.8", "simple-git-hooks": "^2.8.1", diff --git a/packages/plugin-vue/package.json b/packages/plugin-vue/package.json index 49d2d9fc..511d5f98 100644 --- a/packages/plugin-vue/package.json +++ b/packages/plugin-vue/package.json @@ -42,7 +42,7 @@ "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "debug": "^4.3.4", - "rollup": "^2.79.1", + "rollup": "~3.2.3", "slash": "^5.0.0", "source-map": "^0.6.1", "vite": "workspace:*", diff --git a/playground/vitestSetup.ts b/playground/vitestSetup.ts index cf476a87..e768f898 100644 --- a/playground/vitestSetup.ts +++ b/playground/vitestSetup.ts @@ -306,7 +306,7 @@ export async function notifyRebuildComplete( await new Promise((resolve) => { resolveFn = resolve }) - return watcher.removeListener('event', callback) + return watcher.off('event', callback) } function createInMemoryLogger(logs: string[]): Logger { diff --git a/scripts/rollupLicensePlugin.mjs b/scripts/rollupLicensePlugin.mjs index f96719e1..1a3e242e 100644 --- a/scripts/rollupLicensePlugin.mjs +++ b/scripts/rollupLicensePlugin.mjs @@ -5,7 +5,7 @@ import path from 'node:path' import license from 'rollup-plugin-license' import colors from 'picocolors' import fg from 'fast-glob' -import { sync as resolve } from 'resolve' +import resolve from 'resolve' /** * @param {string} licenseFilePath @@ -73,7 +73,7 @@ function licensePlugin(licenseFilePath, licenseTitle, packageName) { if (!licenseText && name) { try { const pkgDir = path.dirname( - resolve(path.join(name, 'package.json'), { + resolve.sync(path.join(name, 'package.json'), { preserveSymlinks: false }) )