Skip to content

Refactor and cleanup to core structure#34

Merged
conico974 merged 24 commits into
mainfrom
conico/core-rewrite
Jul 3, 2026
Merged

Refactor and cleanup to core structure#34
conico974 merged 24 commits into
mainfrom
conico/core-rewrite

Conversation

@conico974

@conico974 conico974 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Move core out of aws.
Remove cloudflare examples that were on Next 15
Bump node to 24
Bumpt typescript to 6

Closes #5

@pkg-pr-new

pkg-pr-new Bot commented Jun 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@34

commit: eb5c2f9

@conico974 conico974 marked this pull request as ready for review June 27, 2026 13:03
Copilot AI review requested due to automatic review settings June 27, 2026 13:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

Open in Devin Review

Comment thread packages/aws/src/build.ts
showWarningOnWindows();

const baseDir = process.cwd();
const openNextDistDir = url.fileURLToPath(new URL(".", import.meta.url));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 openNextDistDir in AWS build.ts points to the AWS package instead of the core package

In packages/aws/src/build.ts:31, openNextDistDir is computed as url.fileURLToPath(new URL('.', import.meta.url)), which resolves to the @opennextjs/aws dist directory. However, adapter templates, override files, and other build resources now live in @opennextjs/core. By contrast, packages/aws/src/adapter.ts:61 correctly uses path.dirname(require.resolve('@opennextjs/core/debug.js')) to point to the core package. The Cloudflare adapter (packages/cloudflare/src/cli/adapter.ts:62) also uses the correct core resolution.

In practice, this may not cause failures because build.ts only calls buildNextjsApp(options) which simply runs next build via child_process.execSync (packages/core/src/build/buildNextApp.ts:18), and the adapter loaded via NEXT_ADAPTER_PATH creates its own correctly-resolved buildOpts. However, buildHelper.initOutputDir(options) at line 52 is called with the potentially incorrect options before the adapter takes over, and any future code that uses these options in the CLI build path would silently use the wrong base directory.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@james-elicx james-elicx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks like some of the workflows will need updating to remove references to the open-next package as well

@conico974

Copy link
Copy Markdown
Contributor Author

looks like some of the workflows will need updating to remove references to the open-next package as well

Yeah and we need to publish this core package as well, otherwise people will not be able to use it 😄

@conico974 conico974 merged commit 46d4792 into main Jul 3, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move AWS out of core

3 participants