Skip to content

Repo: release script breaks on call to yargs.version(false) #8220

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

Closed
JoshuaKGoldberg opened this issue Jan 8, 2024 · 0 comments · Fixed by #8221 or #8223
Closed

Repo: release script breaks on call to yargs.version(false) #8220

JoshuaKGoldberg opened this issue Jan 8, 2024 · 0 comments · Fixed by #8221 or #8223
Assignees
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Jan 8, 2024

Suggestion

From our private automations:

/home/runner/work/private-automations/private-automations/typescript-eslint/tools/release/release.mts:10
  .version(false)
   ^

TypeError: yargs.version is not a function
    at <anonymous> (/home/runner/work/private-automations/private-automations/typescript-eslint/tools/release/release.mts:10:4)
    at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
    at async loadESM (node:internal/process/esm_loader:91:5)
    at async handleMainPromise (node:internal/modules/run_main:65:12)

I'd previously fixed this locally by changing it to yargs(process.argv.slice(2) per https://yargs.js.org/docs/#api-reference.

James noted this did previously work in a test release from the private automations repo. It never worked for me locally. So I'm confused. Maybe I only tried locally in .mts, which maybe has different import semantics?

@JoshuaKGoldberg JoshuaKGoldberg added bug Something isn't working repo maintenance things to do with maintenance of the repo, and not with code/docs accepting prs Go ahead, send a pull request that resolves this issue labels Jan 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
2 participants