8000 Fix bug with 2 separate `PDFJS` objects, add more Node/Bun tests in CI by Electroid · Pull Request #384 · modesty/pdf2json · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix bug with 2 separate PDFJS objects, add more Node/Bun tests in CI #384

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Electroid
Copy link

This PR fixes a bug where there were 2 separate PDFJS objects, and adds support to run tests in Bun.

Thanks for working on this package and happy to help!

@nicolabaesso
Copy link

@Electroid I'm a big fan of your work! Unfortunately I cannot take action on this PR, but the code looks good! Also, keeping support for older versions of NodeJs is always a plus.
Last word goes to @modesty

Copy link
Owner
@modesty modesty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for extending the tests and runtime, appreciated.
better to keep bun related info as extension, not replacement. two reasons:

  1. the package should work with or without bun
  2. existing devOp automation is using npm commands, shoud not break

"test": "jest --config ./jest.config.json && npm run parse-r && npm run parse-fd",
"pretest:node": "npm run build",
"test:node": "jest && npm run parse-r && npm run parse-fd",
"pretest:bun": "npm run build",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reason to add pretest:bun while unused and same as existing pretest ?
better leave pretest, test as before, and add xxx:bun, so that it'd won't break existing devop automation.

`pretest` step builds bundles and source maps for both ES Module and CommonJS, output to `./dist` directory. The Jest test suit is defined in `./test/_test_.cjs` with commonJS, test run will also cover `parse-r` and `parse-fd` with ES Modules via command line.
```bash
bun run test:bun # runs in Bun
bun run test:node # runs in Node.js using Jest
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to 7FAD describe this comment to others. Learn more.

better keep npm test as to not breaking existing devop automation.
keep the bun related info as extension, not replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0