diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index e9fd27f..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -l10n/en-US/*.ftl @mozilla/pdfjs-l10n diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 150b16a..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,16 +0,0 @@ -# PDF.js issue reporting - -The issues are used to track both bugs filed by users and specific work items for developers. Try to file one issue per problem observed. Please specify a valid title (e.g. "Glyph spacing is incorrect" instead of "PDF.js does not work") and provide more details about the issue: link to the PDF, location in the PDF, screenshot, browser version, operating system, PDF.js version and JavaScript console warning/error messages. Issues that do not have enough details provided will be closed as invalid/incomplete. - -If the issue is related to errors produced by a specific PDF, please always include the PDF by providing a URL where contributors can download it. Without a PDF for reproduction, such issues will be closed. We understand that many PDFs contain sensitive information, however having a PDF is essential to resolving the issue and building our regression testing suite. If possible, try creating a reduced example exhibiting the problem but not containing sensitive data. Also small PDFs are best suited for our regression testing. If an important issue only shows on sensitive PDFs, contributors might be willing to accept these PDFs via a secure exchange. - -The issue tracking system is designed to record a single technical problem. A bug report is something where a developer/contributor can work on. The GitHub issue tracker is not a good place for general, not well thought out or unworkable ideas. Most likely a discussion-type issue will not be addressed for a long time or closed as invalid. The best place for general discussions is our Matrix room at https://chat.mozilla.org/#/room/#pdfjs:mozilla.org. - -If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem. - -Note that the translations for PDF.js in the `l10n` folder are imported from the Nightly channel of Mozilla Firefox, such that we don't have to maintain them ourselves. This means that we will not accept pull requests that add new languages and/or modify existing translations, unless the corresponding changes have been made in Mozilla Firefox first. - -See also: -- https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions -- https://github.com/mozilla/pdf.js/wiki/Contributing -- https://github.com/mozilla/pdf.js/blob/master/README.md diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index 9d1dbce..0000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Bug Report -description: Report a bug in PDF.js -title: "[Bug]: " -body: - - type: textarea - attributes: - label: Attach (recommended) or Link to PDF file - description: Without this information the issue may be closed without comment - placeholder: Please place only the PDF file in this field - validations: - required: true - - - type: markdown - attributes: { value: "---" } - - - type: input - attributes: - label: Web browser and its version - description: Please ensure that it's supported, refer to [the FAQ](https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support) - validations: - required: true - - type: input - attributes: - label: Operating system and its version - validations: - required: true - - type: input - attributes: - label: PDF.js version - description: Please find official releases [here](https://github.com/mozilla/pdf.js/releases) - validations: - required: true - - type: dropdown - attributes: - label: Is the bug present in the latest PDF.js version? - description: Please check the [online demo](https://github.com/mozilla/pdf.js#online-demo) - options: ["Yes", "No"] - default: 0 - validations: - required: true - - type: dropdown - attributes: - label: Is a browser extension - options: ["Yes", "No"] - default: 1 - validations: - required: true - - - type: markdown - attributes: { value: "---" } - - - type: textarea - attributes: - label: Steps to reproduce the problem - placeholder: "1.\n2." - validations: - required: true - - - type: textarea - attributes: - label: What is the expected behavior? - description: Also add a screenshot - validations: - required: true - - - type: textarea - attributes: - label: What went wrong? - description: Also add a screenshot - validations: - required: true - - - type: input - attributes: - label: Link to a viewer - description: Needed if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension - - - type: textarea - attributes: - label: Additional context - description: Do you have anything to add that doesn't fit in the issue template? diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 31eae7c..0000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Need help? - url: https://github.com/mozilla/pdf.js/discussions - about: If you need help on how to use PDF.js, please open a discussion where other community members can reply diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml deleted file mode 100644 index 145f4ed..0000000 --- a/.github/ISSUE_TEMPLATE/feature.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Feature request -description: Propose a new feature or enhancement for PDF.js -title: "[Feature]: " -body: - - type: dropdown - attributes: - label: Is the feature relevant to the Firefox PDF Viewer? - options: ["Yes", "No"] - default: 1 - validations: - required: true - - - type: textarea - attributes: - label: Feature description - description: What new feature would you like PDF.js to have? Why would it be useful? What are the current workarounds? - validations: - required: true - - - type: textarea - attributes: - label: Other PDF viewers - description: Do other PDF viewers implement similar functionality? Add descriptions, links, and/or screenshots. diff --git a/.github/SECURITY.md b/.github/SECURITY.md deleted file mode 100644 index 281ecb6..0000000 --- a/.github/SECURITY.md +++ /dev/null @@ -1,13 +0,0 @@ -# Security policy - -Mozilla takes the security of our software seriously. If you believe you have found a security vulnerability in PDF.js, please report it to us as described below. - -## Reporting security vulnerabilities - -**Please don't report security vulnerabilities through public GitHub issues.** - -Instead, please report security vulnerabilities in [Bugzilla](https://bugzilla.mozilla.org/enter_bug.cgi?product=Firefox&component=PDF%20Viewer&groups=firefox-core-security) and make sure that the checkbox in the "Security" section is checked so the required access controls are automatically configured: - -![Security checkbox](https://github.com/mozilla/pdf.js/blob/master/.github/security.png) - -The Mozilla security team will process the bug as described in [Mozilla's security bugs policy](https://www.mozilla.org/en-US/about/governance/policies/security-group/bugs). diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index b85dc18..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" - labels: - - "dependencies" diff --git a/.github/fluent_linter_config.yml b/.github/fluent_linter_config.yml deleted file mode 100644 index dd86299..0000000 --- a/.github/fluent_linter_config.yml +++ /dev/null @@ -1,29 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -# See https://github.com/mozilla-l10n/moz-fluent-linter/blob/main/src/fluent_linter/config.yml -# for details - ---- -ID01: - enabled: true - exclusions: - messages: [] - files: [] -ID02: - enabled: true - min_length: 9 - exclusions: - messages: [] - files: [] -CO01: - enabled: true - brands: - - Firefox - - Mozilla - exclusions: - files: [] - messages: [] -VC: - disabled: false diff --git a/.github/requirements.txt b/.github/requirements.txt deleted file mode 100644 index 5f8b68c..0000000 --- a/.github/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -moz-fluent-linter==0.4.* diff --git a/.github/security.png b/.github/security.png deleted file mode 100644 index 0401281..0000000 Binary files a/.github/security.png and /dev/null differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 6cb1b4f..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: CI -on: [push, pull_request] -permissions: - contents: read - -jobs: - test: - name: Test - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - node-version: [20, 22, 24] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm ci - - - name: Run external tests - run: npx gulp externaltest - - - name: Run CLI unit tests - run: npx gulp unittestcli diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index e09aabc..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CodeQL -on: [push, pull_request] -permissions: - contents: read - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - permissions: - security-events: write - - strategy: - fail-fast: false - matrix: - language: [javascript] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - queries: security-and-quality - - - name: Autobuild CodeQL - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/fluent_linter.yml b/.github/workflows/fluent_linter.yml deleted file mode 100644 index f4a3a2b..0000000 --- a/.github/workflows/fluent_linter.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Lint Fluent Reference Files -on: - push: - paths: - - 'l10n/en-US/**.ftl' - - '.github/fluent_linter_config.yml' - - '.github/workflows/fluent_linter.yml' - branches: - - master - pull_request: - paths: - - 'l10n/en-US/**.ftl' - - '.github/fluent_linter_config.yml' - - '.github/workflows/fluent_linter.yml' - branches: - - master - workflow_dispatch: -permissions: - contents: read - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - - - name: Use Python 3.13 - uses: actions/setup-python@v6 - with: - python-version: '3.13' - cache: 'pip' - - - name: Install Fluent dependencies - run: | - pip install -r .github/requirements.txt - - - name: Lint Fluent reference files - run: | - moz-fluent-lint ./l10n/en-US --config .github/fluent_linter_config.yml diff --git a/.github/workflows/font_tests.yml b/.github/workflows/font_tests.yml deleted file mode 100644 index 8968aa5..0000000 --- a/.github/workflows/font_tests.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Font tests -on: - push: - paths: - - 'gulpfile.mjs' - - 'src/**' - - 'test/test.mjs' - - 'test/font/**' - - '.github/workflows/font_tests.yml' - branches: - - master - pull_request: - paths: - - 'gulpfile.mjs' - - 'src/**' - - 'test/test.mjs' - - 'test/font/**' - - '.github/workflows/font_tests.yml' - branches: - - master - workflow_dispatch: -permissions: - contents: read - -jobs: - test: - name: Test - - strategy: - fail-fast: false - matrix: - node-version: [lts/*] - os: [windows-latest, ubuntu-latest] - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm ci - - - name: Use Python 3.13 - uses: actions/setup-python@v6 - with: - python-version: '3.13' - cache: 'pip' - - - name: Install Fonttools - run: pip install fonttools - - - name: Run font tests - run: npx gulp fonttest --headless diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 7e83745..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Lint -on: [push, pull_request] -permissions: - contents: read - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - node-version: [lts/*] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm ci - - - name: Run lint - run: npx gulp lint - - - name: Run lint-chromium - run: npx gulp lint-chromium diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml deleted file mode 100644 index df687d1..0000000 --- a/.github/workflows/publish_release.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Publish release -on: - release: - types: [published] -permissions: - contents: read - id-token: write - -jobs: - publish: - name: Publish - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [lts/*] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.node-version }} - registry-url: 'https://registry.npmjs.org' - - - name: Install dependencies - run: npm ci - - - name: Build the `pdfjs-dist` library - run: npx gulp dist - - - name: Publish the `pdfjs-dist` library to NPM - run: npm publish ./build/dist --provenance - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish_website.yml b/.github/workflows/publish_website.yml deleted file mode 100644 index 762d390..0000000 --- a/.github/workflows/publish_website.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Publish website -on: - push: - branches: - - master -permissions: - contents: read - -jobs: - build: - name: Build - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [lts/*] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm ci - - - name: Build the website - run: npx gulp web - - - name: Archive the website - shell: sh - run: | - chmod -c -R +rX "$INPUT_PATH" | while read line; do - echo "::warning title=Invalid file permissions automatically fixed::$line" - done - tar \ - --dereference --hard-dereference \ - --directory "$INPUT_PATH" \ - -cvf "$RUNNER_TEMP/website.tar" \ - --exclude=.git \ - --exclude=.github \ - . - env: - INPUT_PATH: build/gh-pages - - - name: Upload the website - uses: actions/upload-artifact@v4 - with: - name: github-pages - path: ${{ runner.temp }}/website.tar - retention-days: 1 - if-no-files-found: error - - deploy: - name: Deploy - runs-on: ubuntu-latest - needs: build - permissions: - pages: write # Required to deploy to GitHub Pages. - id-token: write # Required to verify that the deployment originates from this workflow. - - steps: - - name: Deploy the website - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/types_tests.yml b/.github/workflows/types_tests.yml deleted file mode 100644 index a26d8c6..0000000 --- a/.github/workflows/types_tests.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Types tests -on: [push, pull_request] -permissions: - contents: read - -jobs: - test: - name: Test - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - node-version: [lts/*] - - steps: - - name: Checkout repository - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.node-version }} - - - name: Install dependencies - run: npm ci - - - name: Run types tests - run: npx gulp typestest