diff --git a/packages/next/build/plugins/collect-plugins.ts b/packages/next/build/plugins/collect-plugins.ts index f81ba230432af2c..ad9b4ebfc4c38b7 100644 --- a/packages/next/build/plugins/collect-plugins.ts +++ b/packages/next/build/plugins/collect-plugins.ts @@ -182,11 +182,9 @@ async function _collectPlugins( } // find packages with the naming convention - // @scope/next-plugin-[name] // @next/plugin-[name] - // next-plugin-[name] const filteredDeps = dependencies.filter((name) => { - return name.match(/(^@next\/plugin|next-plugin-)/) + return name.match(/^@next\/plugin/) }) if (nextPluginConfigNames) { diff --git a/test/integration/next-plugins/app/node_modules/@zeit/next-plugin-scope/package.json b/test/integration/next-plugins/app/node_modules/@zeit/next-plugin-scope/package.json deleted file mode 100644 index 4525eb1b1592cdb..000000000000000 --- a/test/integration/next-plugins/app/node_modules/@zeit/next-plugin-scope/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@zeit/next-plugin-scope", - "version": "0.0.1", - "nextjs": { - "name": "Scoped Package Test", - "required-env": [] - }, - "peerDependencies": { - "next": "*" - } -} diff --git a/test/integration/next-plugins/app/node_modules/@zeit/next-plugin-scope/src/on-init-client.js b/test/integration/next-plugins/app/node_modules/@zeit/next-plugin-scope/src/on-init-client.js deleted file mode 100644 index 8b056831d809f6e..000000000000000 --- a/test/integration/next-plugins/app/node_modules/@zeit/next-plugin-scope/src/on-init-client.js +++ /dev/null @@ -1,3 +0,0 @@ -export default async function initClient() { - window.didScopedInit = true -} \ No newline at end of file diff --git a/test/integration/next-plugins/app/node_modules/next-plugin-normal/package.json b/test/integration/next-plugins/app/node_modules/next-plugin-normal/package.json deleted file mode 100644 index 590a3cda9afc57e..000000000000000 --- a/test/integration/next-plugins/app/node_modules/next-plugin-normal/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "next-plugin-normal", - "version": "0.0.1", - "nextjs": { - "name": "Normal Package Test", - "required-env": [] - }, - "peerDependencies": { - "next": "*" - } -} diff --git a/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/dir-with-ext.js/index.js b/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/dir-with-ext.js/index.js deleted file mode 100644 index 4cfbbe36f2f9870..000000000000000 --- a/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/dir-with-ext.js/index.js +++ /dev/null @@ -1 +0,0 @@ -throw new Error('This file should never be loaded') diff --git a/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/dir-without-ext/index.js b/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/dir-without-ext/index.js deleted file mode 100644 index 4cfbbe36f2f9870..000000000000000 --- a/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/dir-without-ext/index.js +++ /dev/null @@ -1 +0,0 @@ -throw new Error('This file should never be loaded') diff --git a/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/on-init-client.js b/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/on-init-client.js deleted file mode 100644 index 7b6f96c57001c1f..000000000000000 --- a/test/integration/next-plugins/app/node_modules/next-plugin-normal/src/on-init-client.js +++ /dev/null @@ -1,3 +0,0 @@ -export default async function initClient() { - window.didNormalInit = true -} \ No newline at end of file diff --git a/test/integration/next-plugins/app/package.json b/test/integration/next-plugins/app/package.json index 3a9403050e037b9..ae559b125d822d4 100644 --- a/test/integration/next-plugins/app/package.json +++ b/test/integration/next-plugins/app/package.json @@ -1,7 +1,5 @@ { "dependencies": { - "@next/plugin-google-analytics": "latest", - "@zeit/next-plugin-scope": "latest", - "next-plugin-normal": "latest" + "@next/plugin-google-analytics": "latest" } } diff --git a/test/integration/next-plugins/test/index.test.js b/test/integration/next-plugins/test/index.test.js index 433bee3d6b02c9a..51189da43f6b1be 100644 --- a/test/integration/next-plugins/test/index.test.js +++ b/test/integration/next-plugins/test/index.test.js @@ -44,8 +44,6 @@ function runTests() { it('should list loaded plugins', async () => { expect(stdout).toMatch(/loaded plugin: @next\/plugin-google-analytics/i) - expect(stdout).toMatch(/loaded plugin: @zeit\/next-plugin-scope/i) - expect(stdout).toMatch(/loaded plugin: next-plugin-normal/i) }) it('should ignore directories in plugins', async () => { @@ -111,8 +109,6 @@ describe('Next.js plugins', () => { it('should disable auto detecting plugins when plugin config is used', async () => { expect(stdout).toMatch(/loaded plugin: @next\/plugin-google-analytics/i) - expect(stdout).not.toMatch(/loaded plugin: @zeit\/next-plugin-scope/i) - expect(stdout).not.toMatch(/loaded plugin: next-plugin-normal/i) }) it('should expose a plugins config', async () => {