-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix(bananass): run command should be considered a match regardless of whether it ends with whitespace #397
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
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
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.
Pull Request Overview
This PR improves the bananass run command by ensuring that test outputs are compared correctly regardless of trailing whitespace. Key changes include:
- Updating the testRunner function to transform and trim outputs before comparison.
- Enhancing type annotations and assertions in both run.js and test-runner.js.
- Adding new problem solutions in CommonJS, ESM, and TypeScript formats.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/bananass/src/commands/bananass-run/test-runner.js | Adjusted output transformation and test assertions to ignore trailing whitespace. |
packages/bananass/src/commands/bananass-run/run.js | Updated type annotations in the declaration of testResults. |
examples/solutions-bananass-{mts, mjs, cts, cjs}/bananass/31403.{ts,js} | Added new problem solutions in various module formats. |
Labels have been automatically applied based on the Conventional Commits specification.🏷️ |
Bundle ReportChanges will decrease total bundle size by 44 bytes (-0.0%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: websites-vitepress-esmAssets Changed:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## main #397 +/- ##
==========================================
+ Coverage 97.03% 97.06% +0.03%
==========================================
Files 155 159 +4
Lines 10051 10157 +106
Branches 10 10
==========================================
+ Hits 9753 9859 +106
Misses 298 298
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
….0-canary.6` (`prerelease`) (#417) ## Release Information: `v0.1.0-canary.6` New release of `lumirlumir/npm-bananass` has arrived! 🎉 This PR bumps the package versions from `v0.1.0-canary.5` to `v0.1.0-canary.6` (`prerelease`). See [Actions](https://github.com/lumirlumir/npm-bananass/actions/runs/14907692682) for more details. | Info | Value | | ----------- | -------------------------- | | Repository | `lumirlumir/npm-bananass` | | SEMVER | `prerelease` | | Pre ID | `canary` | | Short SHA | 3df3983 | | Old Version | `v0.1.0-canary.5` | | New Version | `v0.1.0-canary.6` | <!-- Release notes generated using configuration in .github/release.yml at main --> ## What's Changed ### 🐛 Bug Fixes * fix(bananass): run command should be considered a match regardless of whether it ends with whitespace by @lumirlumir in #397 ### 🧰 Chores * chore(*): cleanup examples and update scripts field of `package.json` by @lumirlumir in #389 * chore(websites-vitepress): create `logo-og.png` by @lumirlumir in #394 * chore(*): remove deprecated `reviewers` field from `dependabot.yml` by @lumirlumir in #407 ### 📝 Documentation * docs(websites-vitepress): create more documentations and remove unused `docs` directory by @lumirlumir in #382 * docs(*): update eslint config and translate `CONTRIBUTING.en.md` by @lumirlumir in #383 * docs(websites-vitepress): add Linux and WSL browser error Q&A by @sukjuhong in #384 * docs(websites-vitepress): create dummy docs for structuring by @lumirlumir in #385 * docs(*): cleanup examples, create dummy docs, and `writing-a-solution-function.md` by @lumirlumir in #386 * docs(websites-vitepress): create more docs by @lumirlumir in #395 * docs(*): add more examples and related docs by @lumirlumir in #404 ### ♻️ Code Refactoring * refactor(create-bananass): update `README.md` in templates by @lumirlumir in #392 * refactor(create-bananass): update solution exmaples in templates by @lumirlumir in #393 * refactor(bananass): detach `webpackResolve` logic from `run.js` by @lumirlumir in #396 ### 🧪 Tests * test(tests-e2e): create more test cases for bananass build by @lumirlumir in #391 * test(*): create test to verify the number of solution files and update `eslint.config.mjs` by @lumirlumir in #416 ### ⬆️ Dependency Updates * chore(deps): bump the typescript-eslint group across 2 directories with 2 updates by @dependabot in #380 * chore(deps-dev): bump @types/node from 22.15.2 to 22.15.3 by @dependabot in #381 * chore(deps): bump the babel group across 2 directories with 3 updates by @dependabot in #387 * chore(deps): bump `open` from `v10.1.1` to `v10.1.2` by @lumirlumir in #388 * chore(deps-dev): bump eslint from 9.25.1 to 9.26.0 by @dependabot in #399 * chore(deps-dev): bump textlint from 14.6.0 to 14.7.1 by @dependabot in #398 * chore(deps): bump the typescript-eslint group across 2 directories with 2 updates by @dependabot in #405 * chore(deps-dev): bump @types/node from 22.15.3 to 22.15.10 by @dependabot in #406 * chore(deps-dev): bump lint-staged from 15.5.1 to 15.5.2 by @dependabot in #408 * chore(deps): bump the babel group across 2 directories with 1 update by @dependabot in #411 * chore(deps-dev): bump @types/node from 22.15.12 to 22.15.15 by @dependabot in #414 * chore(deps): bump the next group across 2 directories with 1 update by @dependabot in #412 ## New Contributors * @sukjuhong made their first contribution in #384 **Full Changelog**: v0.1.0-canary.5...v0.1.0-canary.6
This pull request introduces new solutions for the "bananass" problem in multiple module formats (CommonJS, ESM, TypeScript), along with updates to the
bananass-run
command to improve type safety and test result handling. Below is a summary of the key changes:New Problem Solutions
examples/solutions-bananass-cjs/bananass/31403.js
)examples/solutions-bananass-cts/bananass/31403.ts
)examples/solutions-bananass-mjs/bananass/31403.js
)examples/solutions-bananass-mts/bananass/31403.ts
)Enhancements to
bananass-run
run.js
for thetestResults
variable, ensuring it matches the return type of thetestRunner
function (packages/bananass/src/commands/bananass-run/run.js
).testRunner
function to:Input
andOutput
assertions.transformOutput
to standardize output comparison.packages/bananass/src/commands/bananass-run/test-runner.js
).Input
andOutput
to improve clarity and type safety intest-runner.js
(packages/bananass/src/commands/bananass-run/test-runner.js
).