Fix wonder-stuff-tool-new-pkg output after publishing a new package#1236
Fix wonder-stuff-tool-new-pkg output after publishing a new package#1236beaesguerra merged 2 commits intomainfrom
Conversation
…name for the url to the npm package
🦋 Changeset detectedLatest commit: 80f2859 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1236 +/- ##
==========================================
+ Coverage 82.79% 83.15% +0.35%
==========================================
Files 63 63
Lines 843 843
Branches 210 205 -5
==========================================
+ Hits 698 701 +3
+ Misses 145 142 -3
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
Size Change: 0 B Total Size: 4.22 kB ℹ️ View Unchanged
|
| console.log("\n=== Next Steps ==="); | ||
| console.log(` | ||
| 1. Go to https://www.npmjs.com/package/${packageName | ||
| .replace("@", "") |
There was a problem hiding this comment.
Let me know if this was intentional or if I'm missing some context behind this!
GeraldRequired Reviewers
Don't want to be involved in this pull request? Comment |
| import {printNextSteps} from "../print-next-steps"; | ||
|
|
||
| describe("printNextSteps", () => { | ||
| it("should encode @ as %40 and / as %2F in the npm URL", () => { |
jeremywiebe
left a comment
There was a problem hiding this comment.
I'm not sure why I went with a swapping @ with "". I think this is definitely a bug! Thanks for fixing.
Summary:
I went through the process of publishing a new npm package. It was helpful and I was able to publish the new package successfully!
One small thing I noticed after publishing is the url to the package in the output was giving a 404 error page because the "@" is not accounted for in the package name "@khanacademy/package-name".
This PR fixes that so the @ symbol is encoded and included in the url so the output would be something like: https://www.npmjs.com/package/%40khanacademy%2Feslint-plugin-wonder-blocks
Issue: FEI-7600
Test plan:
Tests pass. I added a new unit test to cover this case, since I would prefer to avoid publishing unneeded placeholder packages to npm to test this!