-
Notifications
You must be signed in to change notification settings - Fork 172
refactor: compileOpenNextConfig
now take a path to the config file
#972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 859bd8f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we should probably update the docs to address this change once merged. I did test this with an absolute path:
# This did work :)
node /home/user/open-next/dist/index.js build --config-path ~/hi/open-next.config.ts
A couple comments: I didn't realize earlier that aws supports Would the current PR be a change in behavior, i.e. If that is the case this is a change in behavior. I believe we can call this a "fix" rather than a breaking change but it would be nice to add details in the changeset. Second comment is that we can use |
Good point. I've updated the changeset. Alternatively, we could remove the support for passing in absolute paths in the AWS CLI and leave it until they do a future breaking change?
That would be a breaking change because we use the config path flag for the Wrangler config as part of allowing users to pass any wrangler flags to the cli. |
@conico974 and others, WDYT?
I think it's |
Ah yes, I see, Wrangler's is |
Ah, good catch! I confirmed this is the case. |
@james-elicx What about:
The new behavior would be:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@james-elicx I have updated the PR description to describe the breaking change in this PR:
open-next build --config-path /relative/to/baseDir
will not treat /relative/to/baseDir
as an absolute path (you would have to use ./relative/to/baseDir
)
I think this is still correct?
If it is, we probably do not want that breaking outside of a major aws release
Yes, that's why I asked if we should remove that part of the change until AWS does a major release. I have no problem removing that if people prefer not to do it as part of this |
We should not introduce a breaking change in aws, confirmed offline with @conico974. For Cloudflare we have to support both absolute ( Ideally this PR can be updated to allow cf CLI support for both absolute and relative paths while not changing the behavior of aws CLI (always relative). |
323935d
to
ff9988e
Compare
Thanks for confirming. I've removed that part of the change. |
.changeset/three-oranges-whisper.md
Outdated
@@ -0,0 +1,7 @@ | |||
--- | |||
"@opennextjs/aws": minor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually treat internal API changes as patch changes.
I'm fine with either but maybe @conico974 has a stronger opinion?
Co-authored-by: Victor Berchet <[email protected]>
@james-elicx I have added a proposal fixup to this PR, might help speed up merging this - or not :) The idea is that:
This change is a patch/refactor because only an internal API is not backward compatible. Minor changes also in this proposal:
What do you think about the proposal? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry guys i took so long to respond here. I was convinced I did 😄
LGTM, I definitely didn't want to introduce a breaking change here
Looks like they were just nitpicks about variable names and jsdoc, so looks good to me. |
openNextConfigPath
now take a path to the config file
openNextConfigPath
now take a path to the config filecompileOpenNextConfig
now take a path to the config file
Right! Thanks for your work on this PR! |
per opennextjs/opennextjs-cloudflare#862 (review)
Using this PR, the CLI will treat absolute paths as absolute, instead of always treating them as relative. Relative paths should not start with a/
, i.e. you should use./config-path.ts
instead of/config-path.ts
.The behavior of the CLI is unchanged after this PR, that is:
will continue to treat
/relative/path
as relative to thebaseDir
==process.cwd()
.