Repository navigation
Fix env flag aliases, fsr generate crash, built-in plugin packaging, correct --version, and CI/engines alignment - #35
Merged
Conversation
…env and add middleware; also provide correct --version output via package.json lookup; add regression tests Co-authored-by: Angel Grablev <agrublev@users.noreply.github.com>
…fter writing fscripts.md Co-authored-by: Angel Grablev <agrublev@users.noreply.github.com>
…lugins → dist/plugins and resolving that path at runtime Co-authored-by: Angel Grablev <agrublev@users.noreply.github.com>
$ vitest run info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. script and align coverage thresholds to 75/75/65/75 per CONTRIBUTING; declare engines.node >=22 Co-authored-by: Angel Grablev <agrublev@users.noreply.github.com>
…expectation Co-authored-by: Angel Grablev <agrublev@users.noreply.github.com>
… greet to command table Co-authored-by: Angel Grablev <agrublev@users.noreply.github.com>
|
Visit the preview URL for this PR (updated for commit 199cb13): https://fscr--pr35-cursor-fix-audit-top-dvdylhdp.web.app (expires Mon, 21 Sep 2026 09:17:03 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 350948a6f3bfa5164f2b7f52215b3d9c2ce8a8ba |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses the top issues reported in the 2026‑09‑14 audit (HEAD 76d5ccd). Outcome: keep behavior identical where intended, fix user‑facing bugs, and align docs/CI/engines. All unit tests pass locally after these changes.
What’s fixed
--prod/--devdidn’t setargv.env, and--env prod|devdidn’t normalize toproduction|development, so handlers could parse unfiltered tasks or no tasks.--prod/--devglobal flags,--envvia a coerce step (prod→production,dev→development), andargv.env.fsr run push --prod→parseScriptFile({ env: 'production' })fsr run push --dev→parseScriptFile({ env: 'development' })fsr run push --env prod→ normalized toproductionfsr run push --env development→ unchangedfsr generatecrash (HIGH)generateFScriptscalledfsrLog.success(...), but the logger lacked asuccessmethod.successtolib/utils/console.jsfor consistent success logging.dist+binshipped; the plugin loader looked in paths that don’t exist post‑install, sofsr pluginswas empty.lib/plugins→dist/plugins(keeps source-friendly layout and works with the bundled CLI).lib/plugins),pluginsdirectory (packed runs:dist/plugins),.fsr/plugins(unchanged), and npmfscr-plugin-*.fsr pluginslists builtins from a packed install as well as in-repo.fsr --versionwrong after install (HIGH)unknownor the consumer project’s version.dist)."test": "vitest run"soyarn testworks as documented."engines": { "node": ">=22" }to reflect Ink 7 requirements and current CI.fsr doctornow defaults to recommending Node >=22 (updated tests accordingly).Nice‑to‑have cleanups
console.log(JSON.stringify(tasks))fromscripts/yarn-wrapper.cjs.fsr greetto the command table.How to verify
bun scripts/bun.build.mjsnpm pack(from repo root) → note the generated tarballmkdir /tmp/fsr-test && cd /tmp/fsr-test && npm init -ynpm i <path-to-tarball>(ornpm i -g <tarball>)npx fsr --version→ should show this package’s version (not the project’s)npx fsr plugins→ should list built‑in plugins with[builtin]fsr run push --prodfilters to production tasksfsr run push --devfilters to development tasksfsr run push --env prodbehaves identically to--env productionpackage.jsonscripts, runfsr generate→ writesfscripts.mdand exits cleanly (logs success).yarn test(fast),yarn test:coverage(thresholds now match CONTRIBUTING).Notes / follow‑ups
lib/shell/greet.jsand nudge thresholds back up incrementally.