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

Fix the repository URL in the package.json file for pdfjs-dist #18358

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Jul 1, 2024

For provenance, enabled in PR #18352, to work the repository URL in package.json is required to match the repository URL of the GitHub Actions invocation. This should fix the following error we encountered publishing a new release today:

npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/pdfjs-dist - Error verifying sigstore provenance bundle: Failed to validate repository information: package.json: "repository.url" is "git+https://github.com/mozilla/pdfjs-dist.git", expected to match "https://github.com/mozilla/pdf.js" from provenance

Notes:

For provenance, enabled in PR mozilla#18352, to work the repository URL in
`package.json` is required to match the repository URL of the GitHub
Actions invocation. This should fix the following error we encountered
publishing a new release today:

```
npm error 422 Unprocessable Entity - PUT https://registry.npmjs.org/pdfjs-dist - Error verifying sigstore provenance bundle: Failed to validate repository information: package.json: "repository.url" is "git+https://github.com/mozilla/pdfjs-dist.git", expected to match "https://github.com/mozilla/pdf.js" from provenance
```
@timvandermeij
Copy link
Contributor Author

timvandermeij commented Jul 1, 2024

I have unpublished the release/tag of the failed release and will retry once this lands. Note that nothing had been pushed to NPM yet.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, with one suggestion; thank you!

gulpfile.mjs Show resolved Hide resolved
@timvandermeij timvandermeij merged commit 19fbc89 into mozilla:master Jul 1, 2024
9 checks passed
@timvandermeij timvandermeij deleted the npm-url branch July 1, 2024 17:55
timvandermeij added a commit to timvandermeij/pdf.js that referenced this pull request Jul 13, 2024
The Git logic for pushing to the `pdfjs-dist` repository was already
removed in PR mozilla#18350, but it was forgotten to also remove the logic to
create a Git repository in the first place. This commit fixes the open
action for that from
mozilla#18358 (comment).

Moreover, we implement the suggestion from
mozilla#18358 (comment)
about moving the Git URL to a separate variable for consistency and we
update the homepage URL to the HTTPS scheme to avoid an HTTP -> HTTPS
redirect and enforce TLS-encrypted connections.
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.

2 participants