-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix: remove import attributes #1117
Merged
Merged
+61
−26
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kellyjosephprice
approved these changes
Dec 10, 2024
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.
Works locally for me
kanadgupta
pushed a commit
that referenced
this pull request
Dec 10, 2024
## [9.0.2-next.1](v9.0.1...v9.0.2-next.1) (2024-12-10) ### Bug Fixes * remove import attributes ([#1117](#1117)) ([e662654](e662654)), closes [#1115](#1115) [/github.com//pull/1115#issuecomment-2532123627](https://github.com//github.com/readmeio/rdme/pull/1115/issues/issuecomment-2532123627) [skip ci]
🎉 This PR is included in version 9.0.2-next.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
kanadgupta
pushed a commit
that referenced
this pull request
Dec 11, 2024
## [9.0.2](v9.0.1...v9.0.2) (2024-12-11) ### Bug Fixes * **autocomplete:** bad alias ([#1118](#1118)) ([5b8d928](5b8d928)) * remove import attributes ([#1117](#1117)) ([e662654](e662654)), closes [#1115](#1115) [/github.com//pull/1115#issuecomment-2532123627](https://github.com//github.com/readmeio/rdme/pull/1115/issues/issuecomment-2532123627) [skip ci]
🎉 This PR is included in version 9.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
kanadgupta
added a commit
that referenced
this pull request
Dec 11, 2024
This reverts commit e662654.
Merged
kanadgupta
added a commit
that referenced
this pull request
Dec 11, 2024
kanadgupta
added a commit
that referenced
this pull request
Dec 11, 2024
kanadgupta
added a commit
that referenced
this pull request
Dec 11, 2024
## 🧰 Changes we hit a bit of a wild edge case where the github action was only breaking in production builds due to how oclif loads the `package.json` and the only way we caught it was with [this failure](https://github.com/readmeio/rdme/actions/runs/12267183540/job/34226921877). this PR reverts #1119 (which in turn brings back #1117) with a slight tweak in f9461b4 to do the following: - make our import paths friendlier to github actions - manually copy over the `package.json` to our `dist/` directory whenever we run `npm run build`. TS was automatically handling this when we were using JSON imports before but now it's not able to pick up on the import so we have to copy it over ourselves. additionally in 669cb4f, i added a little check so we can catch these sorts of things better going forward. ## 🧬 QA & Testing Provide as much information as you can on how to test what you've done.
kanadgupta
pushed a commit
that referenced
this pull request
Dec 12, 2024
## [9.0.4](v9.0.3...v9.0.4) (2024-12-12) ### Bug Fixes * bring back [#1117](#1117) without breaking everything ([#1120](#1120)) ([d5d74c5](d5d74c5)) * **ci:** semantic-release workflow for v9 releases ([#1082](#1082)) ([410daa7](410daa7)) * copy package.json file instead of symlinking ([1d56c21](1d56c21)) * openapi arg doc enhancements, refactors ([#1122](#1122)) ([b83b233](b83b233)) [skip ci]
kanadgupta
added a commit
that referenced
this pull request
Feb 28, 2025
## 🧰 Changes [node v20.18.3](https://nodejs.org/en/blog/release/v20.18.3) officially marked import attributes [as stable](https://nodejs.org/docs/latest-v20.x/api/esm.html#import-attributes). we have a lot of weird workarounds with our `oclif` setup in this repo in an effort to avoid import attributes and the ugly `ExperimentalWarning` outputs we see, but i don't think those should be a concern anymore, for a few reasons: - our minimum required node.js version is node 20, so it should be a non-disruptive change for users to upgrade to the latest node 20 channel - even if folks are on <20.18.2, the `ExperimentalWarning` outputs log to `stderr` so it shouldn't affect any command output-based workflows, which almost always are relying on `stdout`. plus, we discourage this kind of scripting and recommend folks use exit codes instead given the above, this PR brings back JSON imports of `package.json` and vastly simplifies a lot of weirdness in this codebase. ## 🧬 QA & Testing we've added a lot of good test coverage now and i've been playing around with the CLI and github actions build locally and everything seems to work as expected. very unlikely we'll run into the fiasco in #1117, especially now with the cleanups in this PR and #1172.
kanadgupta
added a commit
that referenced
this pull request
Mar 19, 2025
## 🧰 Changes [node v20.18.3](https://nodejs.org/en/blog/release/v20.18.3) officially marked import attributes [as stable](https://nodejs.org/docs/latest-v20.x/api/esm.html#import-attributes). we have a lot of weird workarounds with our `oclif` setup in this repo in an effort to avoid import attributes and the ugly `ExperimentalWarning` outputs we see, but i don't think those should be a concern anymore, for a few reasons: - our minimum required node.js version is node 20, so it should be a non-disruptive change for users to upgrade to the latest node 20 channel - even if folks are on <20.18.2, the `ExperimentalWarning` outputs log to `stderr` so it shouldn't affect any command output-based workflows, which almost always are relying on `stdout`. plus, we discourage this kind of scripting and recommend folks use exit codes instead given the above, this PR brings back JSON imports of `package.json` and vastly simplifies a lot of weirdness in this codebase. ## 🧬 QA & Testing we've added a lot of good test coverage now and i've been playing around with the CLI and github actions build locally and everything seems to work as expected. very unlikely we'll run into the fiasco in #1117, especially now with the cleanups in this PR and #1172.
kanadgupta
added a commit
that referenced
this pull request
Mar 19, 2025
## 🧰 Changes [node v20.18.3](https://nodejs.org/en/blog/release/v20.18.3) officially marked import attributes [as stable](https://nodejs.org/docs/latest-v20.x/api/esm.html#import-attributes). we have a lot of weird workarounds with our `oclif` setup in this repo in an effort to avoid import attributes and the ugly `ExperimentalWarning` outputs we see, but i don't think those should be a concern anymore, for a few reasons: - our minimum required node.js version is node 20, so it should be a non-disruptive change for users to upgrade to the latest node 20 channel - even if folks are on <20.18.2, the `ExperimentalWarning` outputs log to `stderr` so it shouldn't affect any command output-based workflows, which almost always are relying on `stdout`. plus, we discourage this kind of scripting and recommend folks use exit codes instead given the above, this PR brings back JSON imports of `package.json` and vastly simplifies a lot of weirdness in this codebase. ## 🧬 QA & Testing we've added a lot of good test coverage now and i've been playing around with the CLI and github actions build locally and everything seems to work as expected. very unlikely we'll run into the fiasco in #1117, especially now with the cleanups in this PR and #1172.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backported-to-v9
PRs that have been backported to the 9.x channel
refactor
Issues about tackling technical debt
released on @next
released
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧰 Changes
The whole reasoning behind #1115 is because we pass flags in order to avoid emitting this
ExperimentalWarning
for Node v20 users:Per this comment, adding
-S
might be problematic for certain container setups. As a result, I just overhauled how we import JSON in our production code so we don't need that Node CLI flag at all.At some point I'd love if we got to a point where we can fully rely on the oclif config for
package.json
attributes but today is not that day!🧬 QA & Testing
When you check out this branch and run the following commands...
ExperimentalWarning
outputs (like the above screenshot) at any point? (hopefully no)npm ci && npm run build bin/run.js