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

Update Needle to 2.5.0 or greater. #12024

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

DylanLacey
Copy link

@DylanLacey DylanLacey commented Jun 25, 2020

Versions of needle prior to 2.5.0 cannot cope with redirects (as documented).

This prevents prebuilt canvas binaries from being downloaded on MacOS,
requiring the global install of its dependencies.

Updating needle restores it to functionality, addressing this. This change avoids
the need to add request to package.json or bundle pre-built binaries, it also obsoletes #12018.

(NB: needle was already in use for this package.)

Versions of `needle` prior to `2.5.0` cannot cope with redirects (as documented: tomas/needle#312).

This prevents prebuilt `canvas` binaries from being downloaded on MacOS,
requiring the global install of its dependencies.

Updating Needle restores it to functionality, addressing this.  It also avoids
the need to add `request` to `package.json`; it also obsoletes mozilla#12018.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/7b64bca52b810b1/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/7b64bca52b810b1/output.txt

Total script time: 3.43 mins

Published

@timvandermeij timvandermeij merged commit 43c2219 into mozilla:master Jun 26, 2020
@timvandermeij
Copy link
Contributor

Let's do this. Thank you!

timvandermeij added a commit to timvandermeij/pdf.js that referenced this pull request May 16, 2024
The `needle` dependency originally got introduced in mozilla#12024, almost four
years ago, to be able to use pre-built binaries for the `canvas`
dependency on macOS. However, nowadays the `needle` dependency isn't
used by `canvas` anymore, or any other package we use for that matter,
as shown by the empty NPM dependency tree:

```
$ npm ls needle
pdf.js
└── needle@3.3.1
```

Investigation showed that the `canvas` package depends on the
`node-pre-gyp` package which in turn depended on `needle` (see
Automattic/node-canvas#1110 (comment)),
but in version 1.0.0 of `node-pre-gyp` from three years ago the `needle`
dependency got dropped in favor of `node-fetch`. This explains why the
NPM dependency tree is empty now and proves that we can safely get rid
of this dependency.
timvandermeij added a commit to timvandermeij/pdf.js that referenced this pull request May 16, 2024
The `needle` dependency originally got introduced in mozilla#12024, almost four
years ago, to be able to use pre-built binaries for the `canvas`
dependency on macOS. However, nowadays the `needle` dependency isn't
used by `canvas` anymore, or any other package we use for that matter,
as shown by the empty NPM dependency tree:

```
$ npm ls needle
pdf.js
└── needle@3.3.1
```

Investigation showed that the `canvas` package depends on the
`node-pre-gyp` package which in turn depended on `needle` (see
Automattic/node-canvas#1110 (comment)),
but in version 1.0.0 of `node-pre-gyp` from three years ago the `needle`
dependency got dropped in favor of `node-fetch` (see
https://github.com/mapbox/node-pre-gyp/blob/a74f5e367c0d71033620aa0112e7baf7f3515b9d/CHANGELOG.md?plain=1#L52).
This explains why the NPM dependency tree is empty now and proves that
we can safely get rid of this dependency now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants