redhat-developer / redhat-developer/vscode-openshift-tools
Investigate replacing `proxyquire`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 123
- Forks
- 63
- Avg merge
- 6h 16m
- Merged PRs (30d)
- 74
Description
In order for proxyquire to work, all the libraries that you want to stub need to be imported using require() instead of import ... from 'library-name'. This is annoying, because:
- the first import strategy doesn't work well with TypeScript, so none of the library functions we import this way have type checking
- the first import strategy doesn't work well with esbuild, which is why I gave up on bundling
./src/extension.ts
A possible alternative is https://github.com/testdouble/quibble
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing how proxyquire is used with the imports in ./src/extension.ts, especially the require() versus import ... from patterns. Compare the proposed quibble alternative against the TypeScript type-checking and esbuild concerns described in the issue. Done means determining whether a replacement is viable and identifying the migration scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, testing, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100