Skip to content
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

Support node 18.1+ #73

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

Conversation

m59peacemaker
Copy link

Fixes #72

@hisham
Copy link

hisham commented Jun 29, 2023

Can we get this merged?

@mohammedsahl
Copy link

Hey @m59peacemaker were you able to build the project and run the tests successfully after the fix?

@m59peacemaker
Copy link
Author

Hey @m59peacemaker were you able to build the project and run the tests successfully after the fix?

I think it worked for my purposes, but there is some failure in the tests.

Test Suites: 1 failed, 15 passed, 16 total
Tests:       1 failed, 154 passed, 155 total
Snapshots:   1 failed, 153 passed, 154 total
Time:        5.381 s

I don't have time to look into that any further. Due to the restrictive mupdf license, I decided against using it anyway.

@mohammedsahl
Copy link

mohammedsahl commented Jun 30, 2023

Hey @m59peacemaker were you able to build the project and run the tests successfully after the fix?

I think it worked for my purposes, but there is some failure in the tests.

Test Suites: 1 failed, 15 passed, 16 total
Tests:       1 failed, 154 passed, 155 total
Snapshots:   1 failed, 153 passed, 154 total
Time:        5.381 s

I don't have time to look into that any further. Due to the restrictive mupdf license, I decided against using it anyway.

Appreciate the lightning fast response. Don't bother about the failing test. I have none passing so far XD

I've been trying to run the tests on your builds-dev:node-18.1+ branch but all of them error out with the following TypeError error.

  ● getPageText with large file › Page [40 / 58] - should get the page text

    TypeError: openDocument is not a function

      73 |             if (name === void 0) { name = generateFileName(); }
      74 |             writeFile(name, fileData);
    > 75 |             return openDocument(name);
         |                    ^
      76 |         } }, muPdf);
      77 | }
      78 | var i = 0;

      at Object.load (dist/index.js:75:20)
      at specs/helpers/example-file-lg.ts:30:21
      at step (specs/helpers/example-file-lg.ts:33:23)
      at Object.next (specs/helpers/example-file-lg.ts:14:53)
      at fulfilled (specs/helpers/example-file-lg.ts:5:58)

I ran npm run build and npm run test. Did you do something different? And just as a sanity check I'm assuming you ran the tests with Node 18.1+?

@m59peacemaker
Copy link
Author

m59peacemaker commented Jun 30, 2023

You're not wrong - something wild is going on. I cloned the repo and ran build and test and indeed have the same error you have. I even cp -a the cloned I have where tests pass, cleared the tmp dir, build and test again, and now it ran into the error as well. I'm thinking something has changed that affects the build script, so it no longer works.

@m59peacemaker
Copy link
Author

emsdk updated from 3.1.41 to 3.1.42 since I submitted the PR. The issue is that the script pulls the latest emsdk, and 3.1.42 is causing the tests to fail for some reason.

@m59peacemaker
Copy link
Author

As demonstrated by this case, it is best to pin exact versions of dependencies. In the interest of respecting the author's intentions, I did not want to change more than necessary, but I added a commit specifying emsdk 3.1.41 to get the build (mostly?) working again.

@mohammedsahl
Copy link

emsdk updated from 3.1.41 to 3.1.42 since I submitted the PR. The issue is that the script pulls the latest emsdk, and 3.1.42 is causing the tests to fail for some reason.

Can't thank you enough for the help @m59peacemaker. I got all but one test case passing which I assume is the one failing for you too. I'm gonna have a branch of my own checked out from this one for testing. I'll report back if I find any anomalies.

@andytango
Copy link
Owner

@mohammedsahl and @m59peacemaker - thank you very much for your work on this! I will review the PR and take a look at the failing test case next week

@andytango andytango self-requested a review July 7, 2023 07:53
@ShravanSunder
Copy link

@mohammedsahl and @m59peacemaker - thank you very much for your work on this! I will review the PR and take a look at the failing test case next week

would be great to have this @andytango

@tgdn
Copy link

tgdn commented Oct 3, 2023

Are there any updates on this?

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.

[BUG] Incompatible with node 18.1+
6 participants