Skip to content

Commit

Permalink
chore: handle repo and package rename
Browse files Browse the repository at this point in the history
repo: netlify/next-runtime → opennextjs/opennextjs-netlify
npm package: @netlify/plugin-nextjs → @opennextjs/netlify
  • Loading branch information
serhalp committed Oct 23, 2024
1 parent c1a20f7 commit 0aa55fe
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 40 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Next.js Runtime

<p align="center">
<a aria-label="npm version" href="https://www.npmjs.com/package/@netlify/plugin-nextjs">
<img alt="" src="https://img.shields.io/npm/v/@netlify/plugin-nextjs">
<a aria-label="npm version" href="https://www.npmjs.com/package/@opennextjs/netlify">
<img alt="" src="https://img.shields.io/npm/v/@opennextjs/netlify">
</a>
<a aria-label="MIT License" href="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
<img alt="" src="https://img.shields.io/npm/l/@netlify/plugin-nextjs">
<a aria-label="MIT License" href="https://img.shields.io/npm/l/@opennextjs/netlify">
<img alt="" src="https://img.shields.io/npm/l/@opennextjs/netlify">
</a>
</p>

Expand Down Expand Up @@ -37,21 +37,21 @@ manually in the following ways:

### From the UI (Recommended)

You can go to the [UI](https://app.netlify.com/plugins/@netlify/plugin-nextjs/install) and choose
the site to install the Next.js Runtime on. This method is recommended because you will benefit from
You can go to the [UI](https://app.netlify.com/plugins/@opennextjs/netlify/install) and choose the
site to install the Next.js Runtime on. This method is recommended because you will benefit from
auto-upgrades to important fixes and feature updates.

### From `npm`

```shell
npm install -D @netlify/plugin-nextjs
npm install -D @opennextjs/netlify
```

...then add the following to your `netlify.toml` file:

```toml
[[plugins]]
package = "@netlify/plugin-nextjs"
package = "@opennextjs/netlify"
```

This method is recommended if you wish to pin the Next.js Runtime to a specific version.
Expand Down
3 changes: 0 additions & 3 deletions e2e-report/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
base = "e2e-report/"
command = "next build"
publish = ".next"

[[plugins]]
package = "@netlify/plugin-nextjs"
10 changes: 0 additions & 10 deletions e2e-report/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion e2e-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"lint": "next lint"
},
"dependencies": {
"@netlify/plugin-nextjs": "^5.8.1",
"next": "^14.2.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion manifest.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
name: '@netlify/plugin-nextjs'
name: '@opennextjs/netlify'
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@netlify/plugin-nextjs",
"name": "@opennextjs/netlify",
"version": "5.8.1",
"description": "Run Next.js seamlessly on Netlify",
"main": "./dist/index.js",
Expand Down
6 changes: 3 additions & 3 deletions src/build/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function verifyPublishDir(ctx: PluginContext) {
!satisfies(ctx.nextVersion, SUPPORTED_NEXT_VERSIONS, { includePrerelease: true })
) {
ctx.failBuild(
`@netlify/plugin-nextjs@5 requires Next.js version ${SUPPORTED_NEXT_VERSIONS}, but found ${ctx.nextVersion}. Please upgrade your project's Next.js version.`,
`@opennextjs/netlify@5 requires Next.js version ${SUPPORTED_NEXT_VERSIONS}, but found ${ctx.nextVersion}. Please upgrade your project's Next.js version.`,
)
}
}
Expand Down Expand Up @@ -85,7 +85,7 @@ export async function verifyAdvancedAPIRoutes(ctx: PluginContext) {

if (unsupportedAPIRoutes.length !== 0) {
ctx.failBuild(
`@netlify/plugin-nextjs@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:\n${unsupportedAPIRoutes.map((apiRouteConfig) => ` - ${apiRouteConfig.apiRoute} (type: "${apiRouteConfig.config.type}")`).join('\n')}\n\nRefer to https://ntl.fyi/next-scheduled-bg-function-migration as migration example.`,
`@opennextjs/netlify@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:\n${unsupportedAPIRoutes.map((apiRouteConfig) => ` - ${apiRouteConfig.apiRoute} (type: "${apiRouteConfig.config.type}")`).join('\n')}\n\nRefer to https://ntl.fyi/next-scheduled-bg-function-migration as migration example.`,
)
}
}
Expand Down Expand Up @@ -119,7 +119,7 @@ export function verifyNetlifyForms(ctx: PluginContext, html: string) {
formDetectionRegex.test(html)
) {
ctx.failBuild(
'@netlify/plugin-nextjs@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.',
'@opennextjs/netlify@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.',
)
}
}
2 changes: 1 addition & 1 deletion tests/integration/advanced-api-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ it<FixtureTestContext>('test', async (ctx) => {
const runPluginPromise = runPlugin(ctx)

await expect(runPluginPromise).rejects.toThrow(
'@netlify/plugin-nextjs@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:',
'@opennextjs/netlify@5 does not support advanced API routes. The following API routes should be migrated to Netlify background or scheduled functions:',
)

// list API routes to migrate
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/netlify-forms.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ it<FixtureTestContext>('should fail build when netlify forms are used', async (c
const runPluginPromise = runPlugin(ctx)

await expect(runPluginPromise).rejects.toThrow(
'@netlify/plugin-nextjs@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.',
'@opennextjs/netlify@5 requires migration steps to support Netlify Forms. Refer to https://ntl.fyi/next-runtime-forms-migration for migration example.',
)
})

Expand Down
6 changes: 3 additions & 3 deletions tests/smoke/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('version check', () => {
async () => {
await expect(selfCleaningFixtureFactories.next12_1_0()).rejects.toThrow(
new RegExp(
`@netlify/plugin-nextjs@5 requires Next.js version >=13.5.0, but found 12.1.0. Please upgrade your project's Next.js version.`,
`@opennextjs/netlify@5 requires Next.js version >=13.5.0, but found 12.1.0. Please upgrade your project's Next.js version.`,
),
)
},
Expand All @@ -83,7 +83,7 @@ describe('version check', () => {
selfCleaningFixtureFactories.yarnMonorepoMultipleNextVersionsSiteIncompatible(),
).rejects.toThrow(
new RegExp(
`@netlify/plugin-nextjs@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`,
`@opennextjs/netlify@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`,
),
)
},
Expand All @@ -101,7 +101,7 @@ describe('version check', () => {
fixtureFactories.npmNestedSiteMultipleNextVersionsIncompatible(),
).rejects.toThrow(
new RegExp(
`@netlify/plugin-nextjs@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`,
`@opennextjs/netlify@5 requires Next.js version >=13.5.0, but found 13.4.1. Please upgrade your project's Next.js version.`,
),
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,3 @@
base = ""
command = "npm run build"
publish = "apps/site/.next"

[[plugins]]
package = "@netlify/plugin-nextjs"
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[build]
command = "node setup-site.mjs && npm install && npm run build -w apps/site"
publish = "./apps/site/.next"

[[plugins]]
package = "@netlify/plugin-nextjs"

0 comments on commit 0aa55fe

Please sign in to comment.