Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: npm/ssri
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: readmeio/ssri
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.

Commits on Oct 7, 2022

  1. feat: slimming down the library to just what we need (#1)

    * chore: pairing down unneeded components
    
    * feat: pairing down parts of the library that we don't need
    
    * feat: moving parts of the library over to TS
    
    * feat: heavily pairing down the library
    
    * feat: moving everything over to typescript
    erunion authored Oct 7, 2022
    Copy the full SHA
    1c660e0 View commit details
  2. fix: ci

    erunion committed Oct 7, 2022
    Copy the full SHA
    4939398 View commit details
  3. docs: updating the readme

    erunion committed Oct 7, 2022
    Copy the full SHA
    0cf8975 View commit details
  4. chore: docs cleanup

    erunion committed Oct 7, 2022
    Copy the full SHA
    68ea28a View commit details

Commits on Nov 2, 2022

  1. chore(deps-dev): bump eslint from 8.24.0 to 8.26.0 (#3)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.24.0 to 8.26.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.24.0...v8.26.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 2, 2022
    Copy the full SHA
    d0ae09d View commit details
  2. chore(deps-dev): bump mocha from 10.0.0 to 10.1.0 (#4)

    Bumps [mocha](https://github.com/mochajs/mocha) from 10.0.0 to 10.1.0.
    - [Release notes](https://github.com/mochajs/mocha/releases)
    - [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md)
    - [Commits](mochajs/mocha@v10.0.0...v10.1.0)
    
    ---
    updated-dependencies:
    - dependency-name: mocha
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 2, 2022
    Copy the full SHA
    7677bce View commit details
  3. chore(deps-dev): bump @types/node from 18.8.3 to 18.11.8 (#5)

    Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.8.3 to 18.11.8.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 2, 2022
    Copy the full SHA
    1a9128e View commit details

Commits on Dec 1, 2022

  1. Copy the full SHA
    ea11613 View commit details

Commits on Jan 3, 2023

  1. Copy the full SHA
    3375480 View commit details

Commits on Feb 1, 2023

  1. Copy the full SHA
    223680a View commit details

Commits on Mar 2, 2023

  1. chore(deps-dev): bump eslint from 8.33.0 to 8.35.0 (#25)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.33.0 to 8.35.0.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.33.0...v8.35.0)
    
    ---
    updated-dependencies:
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 2, 2023
    Copy the full SHA
    41f83df View commit details
  2. chore(deps-dev): bump prettier from 2.8.3 to 2.8.4 (#24)

    Bumps [prettier](https://github.com/prettier/prettier) from 2.8.3 to 2.8.4.
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@2.8.3...2.8.4)
    
    ---
    updated-dependencies:
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 2, 2023
    Copy the full SHA
    25d0ba5 View commit details
  3. chore(deps-dev): bump @types/node from 18.11.18 to 18.14.2 (#23)

    Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.11.18 to 18.14.2.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Mar 2, 2023
    Copy the full SHA
    c250b96 View commit details

Commits on Apr 1, 2023

  1. Copy the full SHA
    cdb5b5b View commit details
  2. chore(deps-dev): bump @types/node from 18.14.2 to 18.15.11 (#29)

    Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.14.2 to 18.15.11.
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Apr 1, 2023
    Copy the full SHA
    c19847b View commit details

Commits on May 1, 2023

  1. Copy the full SHA
    c29467c View commit details
  2. Copy the full SHA
    57143a9 View commit details
  3. Copy the full SHA
    2895d1b View commit details
  4. Copy the full SHA
    dc40355 View commit details
  5. Copy the full SHA
    45bedd8 View commit details

Commits on Jun 1, 2023

  1. Copy the full SHA
    cb3a2ea View commit details
  2. Copy the full SHA
    be4cc5f View commit details
  3. build: 2.0.0 release

    erunion committed Jun 1, 2023
    Copy the full SHA
    6c62d53 View commit details
  4. chore: bump deps

    erunion committed Jun 1, 2023
    Copy the full SHA
    d3e35cc View commit details
  5. build: 2.0.1 release

    erunion committed Jun 1, 2023
    Copy the full SHA
    1e29e03 View commit details

Commits on Jul 1, 2023

  1. Copy the full SHA
    89c2276 View commit details

Commits on Aug 1, 2023

  1. Copy the full SHA
    a6811d8 View commit details
  2. Copy the full SHA
    2fecd32 View commit details
  3. Copy the full SHA
    23898c1 View commit details

Commits on Aug 13, 2023

  1. Copy the full SHA
    4ff42ca View commit details

Commits on Sep 1, 2023

  1. Copy the full SHA
    bac3a7b View commit details

Commits on Oct 4, 2023

  1. Copy the full SHA
    148bb35 View commit details
  2. build: 3.0.0 release

    erunion committed Oct 4, 2023
    Copy the full SHA
    b057b67 View commit details

Commits on Nov 1, 2023

  1. chore(deps-dev): bump the minor-development-deps group with 3 updates (

    …#56)
    
    Bumps the minor-development-deps group with 3 updates: [@readme/eslint-config](https://github.com/readmeio/standards), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [eslint](https://github.com/eslint/eslint).
    
    
    Updates `@readme/eslint-config` from 13.0.1 to 13.3.1
    - [Release notes](https://github.com/readmeio/standards/releases)
    - [Commits](https://github.com/readmeio/standards/compare/@readme/eslint-config@13.0.1...@readme/eslint-config@13.3.1)
    
    Updates `@types/node` from 20.8.2 to 20.8.10
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `eslint` from 8.50.0 to 8.52.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.50.0...v8.52.0)
    
    ---
    updated-dependencies:
    - dependency-name: "@readme/eslint-config"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 1, 2023
    Copy the full SHA
    aab69cf View commit details

Commits on Nov 2, 2023

  1. chore(deps): bump actions/setup-node from 3 to 4 (#57)

    Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
    - [Release notes](https://github.com/actions/setup-node/releases)
    - [Commits](actions/setup-node@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/setup-node
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Nov 2, 2023
    Copy the full SHA
    d835732 View commit details

Commits on Dec 3, 2023

  1. chore(deps-dev): bump the minor-development-deps group with 5 updates (

    …#58)
    
    Bumps the minor-development-deps group with 5 updates:
    
    | Package | From | To |
    | --- | --- | --- |
    | [@readme/eslint-config](https://github.com/readmeio/standards) | `13.3.1` | `13.4.0` |
    | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.8.10` | `20.10.1` |
    | [eslint](https://github.com/eslint/eslint) | `8.52.0` | `8.54.0` |
    | [prettier](https://github.com/prettier/prettier) | `3.0.3` | `3.1.0` |
    | [typescript](https://github.com/Microsoft/TypeScript) | `5.2.2` | `5.3.2` |
    
    
    Updates `@readme/eslint-config` from 13.3.1 to 13.4.0
    - [Release notes](https://github.com/readmeio/standards/releases)
    - [Commits](https://github.com/readmeio/standards/compare/@readme/eslint-config@13.3.1...@readme/eslint-config@13.4.0)
    
    Updates `@types/node` from 20.8.10 to 20.10.1
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `eslint` from 8.52.0 to 8.54.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.52.0...v8.54.0)
    
    Updates `prettier` from 3.0.3 to 3.1.0
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.0.3...3.1.0)
    
    Updates `typescript` from 5.2.2 to 5.3.2
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](microsoft/TypeScript@v5.2.2...v5.3.2)
    
    ---
    updated-dependencies:
    - dependency-name: "@readme/eslint-config"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: typescript
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 3, 2023
    Copy the full SHA
    c0a9600 View commit details

Commits on Dec 6, 2023

  1. chore(deps-dev): bump vite from 4.4.10 to 5.0.5 (#59)

    Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.10 to 5.0.5.
    - [Release notes](https://github.com/vitejs/vite/releases)
    - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
    - [Commits](https://github.com/vitejs/vite/commits/v5.0.5/packages/vite)
    
    ---
    updated-dependencies:
    - dependency-name: vite
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 6, 2023
    Copy the full SHA
    4e0b0c6 View commit details

Commits on Jan 1, 2024

  1. Copy the full SHA
    6ab16aa View commit details
  2. chore(deps-dev): bump the minor-development-deps group with 4 updates (

    …#61)
    
    Bumps the minor-development-deps group with 4 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint](https://github.com/eslint/eslint), [prettier](https://github.com/prettier/prettier) and [typescript](https://github.com/Microsoft/TypeScript).
    
    
    Updates `@types/node` from 20.10.1 to 20.10.6
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `eslint` from 8.54.0 to 8.56.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.54.0...v8.56.0)
    
    Updates `prettier` from 3.1.0 to 3.1.1
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.1.0...3.1.1)
    
    Updates `typescript` from 5.3.2 to 5.3.3
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Commits](microsoft/TypeScript@v5.3.2...v5.3.3)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    - dependency-name: typescript
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 1, 2024
    Copy the full SHA
    9be49ae View commit details
  3. chore(deps-dev): bump vitest and @vitest/coverage-v8 (#62)

    Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) and [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8). These dependencies needed to be updated together.
    
    Updates `vitest` from 0.34.6 to 1.1.1
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.1.1/packages/vitest)
    
    Updates `@vitest/coverage-v8` from 0.34.6 to 1.1.1
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.1.1/packages/coverage-v8)
    
    ---
    updated-dependencies:
    - dependency-name: vitest
      dependency-type: direct:development
      update-type: version-update:semver-major
    - dependency-name: "@vitest/coverage-v8"
      dependency-type: direct:development
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 1, 2024
    Copy the full SHA
    6819cb3 View commit details

Commits on Jan 19, 2024

  1. chore(deps-dev): bump vite from 5.0.10 to 5.0.12 (#63)

    Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 5.0.10 to 5.0.12.
    - [Release notes](https://github.com/vitejs/vite/releases)
    - [Changelog](https://github.com/vitejs/vite/blob/v5.0.12/packages/vite/CHANGELOG.md)
    - [Commits](https://github.com/vitejs/vite/commits/v5.0.12/packages/vite)
    
    ---
    updated-dependencies:
    - dependency-name: vite
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 19, 2024
    Copy the full SHA
    fc6d322 View commit details

Commits on Feb 1, 2024

  1. chore(deps): bump actions/cache from 3 to 4 (#64)

    Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
    - [Release notes](https://github.com/actions/cache/releases)
    - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
    - [Commits](actions/cache@v3...v4)
    
    ---
    updated-dependencies:
    - dependency-name: actions/cache
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 1, 2024
    Copy the full SHA
    3c439bf View commit details
  2. chore(deps-dev): bump the minor-development-deps group with 5 updates (

    …#65)
    
    Bumps the minor-development-deps group with 5 updates:
    
    | Package | From | To |
    | --- | --- | --- |
    | [@readme/eslint-config](https://github.com/readmeio/standards) | `13.4.0` | `13.4.1` |
    | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.10.6` | `20.11.14` |
    | [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `1.1.1` | `1.2.2` |
    | [prettier](https://github.com/prettier/prettier) | `3.1.1` | `3.2.4` |
    | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `1.1.1` | `1.2.2` |
    
    
    Updates `@readme/eslint-config` from 13.4.0 to 13.4.1
    - [Release notes](https://github.com/readmeio/standards/releases)
    - [Commits](https://github.com/readmeio/standards/compare/@readme/eslint-config@13.4.0...@readme/eslint-config@13.4.1)
    
    Updates `@types/node` from 20.10.6 to 20.11.14
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `@vitest/coverage-v8` from 1.1.1 to 1.2.2
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.2.2/packages/coverage-v8)
    
    Updates `prettier` from 3.1.1 to 3.2.4
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.1.1...3.2.4)
    
    Updates `vitest` from 1.1.1 to 1.2.2
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.2.2/packages/vitest)
    
    ---
    updated-dependencies:
    - dependency-name: "@readme/eslint-config"
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: "@vitest/coverage-v8"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: vitest
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 1, 2024
    Copy the full SHA
    2847f39 View commit details

Commits on Mar 6, 2024

  1. chore(deps-dev): bump the minor-development-deps group with 6 updates (

    …#66)
    
    * chore(deps-dev): bump the minor-development-deps group with 6 updates
    
    Bumps the minor-development-deps group with 6 updates:
    
    | Package | From | To |
    | --- | --- | --- |
    | [@readme/eslint-config](https://github.com/readmeio/standards) | `13.4.1` | `13.5.0` |
    | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.11.14` | `20.11.24` |
    | [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) | `1.2.2` | `1.3.1` |
    | [eslint](https://github.com/eslint/eslint) | `8.56.0` | `8.57.0` |
    | [prettier](https://github.com/prettier/prettier) | `3.2.4` | `3.2.5` |
    | [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) | `1.2.2` | `1.3.1` |
    
    
    Updates `@readme/eslint-config` from 13.4.1 to 13.5.0
    - [Release notes](https://github.com/readmeio/standards/releases)
    - [Commits](https://github.com/readmeio/standards/compare/@readme/eslint-config@13.4.1...@readme/eslint-config@13.5.0)
    
    Updates `@types/node` from 20.11.14 to 20.11.24
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `@vitest/coverage-v8` from 1.2.2 to 1.3.1
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.3.1/packages/coverage-v8)
    
    Updates `eslint` from 8.56.0 to 8.57.0
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.56.0...v8.57.0)
    
    Updates `prettier` from 3.2.4 to 3.2.5
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.2.4...3.2.5)
    
    Updates `vitest` from 1.2.2 to 1.3.1
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.3.1/packages/vitest)
    
    ---
    updated-dependencies:
    - dependency-name: "@readme/eslint-config"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    - dependency-name: "@vitest/coverage-v8"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: eslint
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-patch
      dependency-group: minor-development-deps
    - dependency-name: vitest
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    * fix: linting issues
    
    ---------
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Jon Ursenbach <jon@ursenba.ch>
    dependabot[bot] and erunion authored Mar 6, 2024
    Copy the full SHA
    2b096fb View commit details

Commits on Apr 1, 2024

  1. Copy the full SHA
    ddd20b4 View commit details

Commits on May 1, 2024

  1. Copy the full SHA
    0295b4b View commit details
  2. Copy the full SHA
    cad84c7 View commit details

Commits on Jun 1, 2024

  1. chore(deps-dev): bump the minor-development-deps group with 3 updates (

    …#70)
    
    Bumps the minor-development-deps group with 3 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@vitest/coverage-v8](https://github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).
    
    
    Updates `@types/node` from 20.12.7 to 20.13.0
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `@vitest/coverage-v8` from 1.5.3 to 1.6.0
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.6.0/packages/coverage-v8)
    
    Updates `vitest` from 1.5.3 to 1.6.0
    - [Release notes](https://github.com/vitest-dev/vitest/releases)
    - [Commits](https://github.com/vitest-dev/vitest/commits/v1.6.0/packages/vitest)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: "@vitest/coverage-v8"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: vitest
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 1, 2024
    Copy the full SHA
    3c3ac79 View commit details

Commits on Jun 21, 2024

  1. chore(deps-dev): bump braces from 3.0.2 to 3.0.3 (#71)

    Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
    - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
    - [Commits](micromatch/braces@3.0.2...3.0.3)
    
    ---
    updated-dependencies:
    - dependency-name: braces
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jun 21, 2024
    Copy the full SHA
    789db93 View commit details

Commits on Jul 1, 2024

  1. chore(deps-dev): bump the minor-development-deps group with 3 updates (

    …#72)
    
    Bumps the minor-development-deps group with 3 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [prettier](https://github.com/prettier/prettier) and [typescript](https://github.com/Microsoft/TypeScript).
    
    
    Updates `@types/node` from 20.13.0 to 20.14.9
    - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
    - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
    
    Updates `prettier` from 3.2.5 to 3.3.2
    - [Release notes](https://github.com/prettier/prettier/releases)
    - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
    - [Commits](prettier/prettier@3.2.5...3.3.2)
    
    Updates `typescript` from 5.4.5 to 5.5.2
    - [Release notes](https://github.com/Microsoft/TypeScript/releases)
    - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
    - [Commits](microsoft/TypeScript@v5.4.5...v5.5.2)
    
    ---
    updated-dependencies:
    - dependency-name: "@types/node"
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: prettier
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    - dependency-name: typescript
      dependency-type: direct:development
      update-type: version-update:semver-minor
      dependency-group: minor-development-deps
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jul 1, 2024
    Copy the full SHA
    84a2100 View commit details
10 changes: 0 additions & 10 deletions .commitlintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage/
dist/
7 changes: 7 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": [
"@readme/eslint-config",
"@readme/eslint-config/typescript"
],
"root": true
}
17 changes: 0 additions & 17 deletions .eslintrc.js

This file was deleted.

3 changes: 0 additions & 3 deletions .github/CODEOWNERS

This file was deleted.

54 changes: 0 additions & 54 deletions .github/ISSUE_TEMPLATE/bug.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

39 changes: 27 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

version: 2

updates:
- package-ecosystem: npm
directory: /
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
allow:
- dependency-type: direct
versioning-strategy: increase-if-necessary
interval: monthly
reviewers:
- erunion
labels:
- dependencies
commit-message:
prefix: deps
prefix-development: chore
prefix: chore(deps)
prefix-development: chore(deps-dev)

- package-ecosystem: npm
directory: "/"
schedule:
interval: monthly
open-pull-requests-limit: 10
reviewers:
- erunion
labels:
- "Dependencies"
- dependencies
groups:
minor-development-deps:
dependency-type: 'development'
update-types:
- minor
- patch
commit-message:
prefix: chore(deps)
prefix-development: chore(deps-dev)
32 changes: 0 additions & 32 deletions .github/matchers/tap.json

This file was deleted.

2 changes: 0 additions & 2 deletions .github/settings.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/audit.yml

This file was deleted.

154 changes: 0 additions & 154 deletions .github/workflows/ci-release.yml

This file was deleted.

197 changes: 54 additions & 143 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,157 +1,68 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CI

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- latest
schedule:
# "At 09:00 UTC (02:00 PT) on Monday" https://crontab.guru/#0_9_*_*_1
- cron: "0 9 * * 1"
on: [push]

jobs:
engines:
name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
if: github.repository_owner == 'npm'
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
os: ubuntu-latest
shell: bash
node-version:
- 14.17.0
- 16.13.0
- 18.0.0
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update Windows npm
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Install npm@7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Install npm@latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund --engines-strict

lint:
name: Lint
if: github.repository_owner == 'npm'
linting:
runs-on: ubuntu-latest
defaults:
run:
shell: bash

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
- uses: actions/checkout@v4
- uses: actions/setup-node@v4

- name: Get npm cache directory
id: npm-cache-dir
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v4
id: npm-cache
with:
node-version: 18.x
- name: Install npm@latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund
- name: Lint
run: npm run lint --ignore-scripts
- name: Post Lint
run: npm run postlint --ignore-scripts
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run lint

test:
name: Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
if: github.repository_owner == 'npm'
node_tests:
name: Node ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
fail-fast: true
matrix:
platform:
- name: Linux
os: ubuntu-latest
shell: bash
- name: macOS
os: macos-latest
shell: bash
- name: Windows
os: windows-latest
shell: cmd
node-version:
- 14.17.0
- 14.x
- 16.13.0
- 16.x
- 18.0.0
- 18.x
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
os:
- ubuntu-latest
- windows-latest
node:
- lts/-1
- lts/*
- latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
- name: Checkout source
uses: actions/checkout@v4

- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Update Windows npm
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
node-version: ${{ matrix.node }}

- name: Get npm cache directory
id: npm-cache-dir
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Install npm@7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Install npm@latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund
- name: Add Problem Matcher
run: echo "::add-matcher::.github/matchers/tap.json"
- name: Test
run: npm test --ignore-scripts -iwr
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
- run: npx vitest
43 changes: 20 additions & 23 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

name: CodeQL
name: "CodeQL"

on:
push:
branches:
- main
- latest
branches: [ main ]
pull_request:
branches:
- main
- latest
branches: [ main ]
schedule:
# "At 10:00 UTC (03:00 PT) on Monday" https://crontab.guru/#0_10_*_*_1
- cron: "0 10 * * 1"
- cron: '0 0 1 * *'

jobs:
analyze:
@@ -23,16 +16,20 @@ jobs:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: javascript
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
121 changes: 0 additions & 121 deletions .github/workflows/post-dependabot.yml

This file was deleted.

48 changes: 0 additions & 48 deletions .github/workflows/pull-request.yml

This file was deleted.

234 changes: 0 additions & 234 deletions .github/workflows/release.yml

This file was deleted.

31 changes: 3 additions & 28 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,3 @@
# This file is automatically added by @npmcli/template-oss. Do not edit.

# ignore everything in the root
/*

# keep these
!**/.gitignore
!/.commitlintrc.js
!/.eslintrc.js
!/.eslintrc.local.*
!/.github/
!/.gitignore
!/.npmrc
!/.release-please-manifest.json
!/bin/
!/CHANGELOG*
!/CODE_OF_CONDUCT.md
!/docs/
!/lib/
!/LICENSE*
!/map.js
!/package.json
!/README*
!/release-please-config.json
!/scripts/
!/SECURITY.md
!/tap-snapshots/
!/test/
coverage/
dist/
node_modules/
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.github/
coverage/
test/
.eslint*
.prettier*
3 changes: 0 additions & 3 deletions .npmrc

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage/
dist/
3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

371 changes: 0 additions & 371 deletions CHANGELOG.md

This file was deleted.

7 changes: 0 additions & 7 deletions CODE_OF_CONDUCT.md

This file was deleted.

28 changes: 15 additions & 13 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
ISC License
Copyright © 2023 ReadMe

Copyright 2021 (c) npm, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the “Software”), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

Permission to use, copy, modify, and/or distribute this software for
any purpose with or without fee is hereby granted, provided that the
above copyright notice and this permission notice appear in all copies.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
490 changes: 43 additions & 447 deletions README.md

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions SECURITY.md

This file was deleted.

527 changes: 0 additions & 527 deletions lib/index.js

This file was deleted.

11,452 changes: 11,452 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

84 changes: 29 additions & 55 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,38 @@
{
"name": "ssri",
"version": "9.0.1",
"description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.",
"main": "lib/index.js",
"files": [
"bin/",
"lib/"
],
"scripts": {
"prerelease": "npm t",
"postrelease": "npm publish",
"posttest": "npm run lint",
"test": "tap",
"coverage": "tap",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"template-oss-apply": "template-oss-apply --force",
"lintfix": "npm run lint -- --fix",
"snap": "tap"
},
"tap": {
"check-coverage": true,
"nyc-arg": [
"--exclude",
"tap-snapshots/**"
]
"name": "@readme/ssri",
"version": "3.0.0",
"description": "Standard Subresource Integrity library -- parses, generates, and verifies integrity metadata according to the SRI spec.",
"license": "MIT",
"author": "ReadMe <support@readme.io> (https://readme.com)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"engines": {
"node": ">=18"
},
"repository": {
"type": "git",
"url": "https://github.com/npm/ssri.git"
"url": "https://github.com/readmeio/ssri.git"
},
"keywords": [
"w3c",
"web",
"security",
"integrity",
"checksum",
"hashing",
"subresource integrity",
"sri",
"sri hash",
"sri string",
"sri generator",
"html"
],
"author": "GitHub Inc.",
"license": "ISC",
"dependencies": {
"minipass": "^3.1.1"
"bugs": {
"url": "https://github.com/readmeio/ssri/issues"
},
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "4.4.4",
"tap": "^16.0.1"
"scripts": {
"build": "tsc",
"lint": "eslint . --ext .js,.ts",
"prebuild": "rm -rf dist/",
"prepack": "npm run build",
"pretest": "npm run lint",
"prettier": "prettier --list-different --write \"./**/**.{js,ts}\"",
"test": "vitest --coverage"
},
"engines": {
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
"devDependencies": {
"@readme/eslint-config": "^14.4.2",
"@types/node": "^22.0.2",
"@vitest/coverage-v8": "^3.0.4",
"eslint": "^8.57.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"vitest": "^3.0.4"
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "4.4.4"
}
"prettier": "@readme/eslint-config/prettier"
}
36 changes: 0 additions & 36 deletions release-please-config.json

This file was deleted.

133 changes: 133 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
import crypto from 'crypto';

const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'];

// TODO: this should really be a hardcoded list of algorithms we support,
// rather than [a-z0-9].
const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i;
const STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/;
const VCHAR_REGEX = /^[\x21-\x7E]+$/;

const getOptString = (options: string[]) => (!options || !options.length ? '' : `?${options.join('?')}`);

export interface Options {
algorithm?: string;
options?: string[];
}

class Hash {
source: string;

digest: string;

algorithm: string;

options: string[];

constructor(hash: string) {
this.source = hash.trim();

// set default values so that we make V8 happy to
// always see a familiar object template.
this.digest = '';
this.algorithm = '';
this.options = [];

// 3.1. Integrity metadata (called "Hash" by ssri)
// https://w3c.github.io/webappsec-subresource-integrity/#integrity-metadata-description
const match = this.source.match(STRICT_SRI_REGEX);
if (!match) {
return;
} else if (!SPEC_ALGORITHMS.some(a => a === match[1])) {
return;
}

this.algorithm = match[1];
this.digest = match[2];

const rawOpts = match[3];
if (rawOpts) {
this.options = rawOpts.slice(1).split('?');
}
}

toJSON() {
return this.toString();
}

toString() {
if (
!(
// The spec has very restricted productions for algorithms.
// https://www.w3.org/TR/CSP2/#source-list-syntax
(
SPEC_ALGORITHMS.some(x => x === this.algorithm) &&
// Usually, if someone insists on using a "different" base64, we
// leave it as-is, since there's multiple standards, and the
// specified is not a URL-safe variant.
// https://www.w3.org/TR/CSP2/#base64_value
this.digest.match(BASE64_REGEX) &&
// Option syntax is strictly visual chars.
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-option-expression
// https://tools.ietf.org/html/rfc5234#appendix-B.1
this.options.every(opt => opt.match(VCHAR_REGEX))
)
)
) {
return '';
}

const options = this.options && this.options.length ? `?${this.options.join('?')}` : '';
return `${this.algorithm}-${this.digest}${options}`;
}
}

export function parse(sri: string) {
if (!sri) {
return null;
}

return new Hash(sri);
}

export function create(data: Buffer | string, opts: Options = {}) {
// eslint-disable-next-line no-param-reassign
opts = {
algorithm: 'sha512',
options: [],
...opts,
};

const algorithm = opts.algorithm;
const optString = getOptString(opts.options);

const digest = crypto.createHash(algorithm).update(data).digest('base64');
return new Hash(`${algorithm}-${digest}${optString}`);
}

export function verify(data: Buffer | string, sri: Hash | string) {
try {
if (typeof sri === 'object' && sri instanceof Hash) {
// eslint-disable-next-line no-param-reassign
sri = sri.toString();
}

// eslint-disable-next-line no-param-reassign
sri = parse(sri);
if (!sri) {
return false;
}

const algorithm = sri.algorithm;
const digest = crypto.createHash(algorithm).update(data).digest('base64');
const newSri = parse(`${algorithm}-${digest}`);

return sri.toString() === newSri.toString();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (err) {
// `crypto.createHash()` will throw errors if `algorithm` is invalid which will happen if we're
// supplied with an invalid or corrupt hash. Since we just want this method to only verify if
// two given hashes match, we don't want to throw if that happens.
return false;
}
}
3 changes: 3 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@readme/eslint-config/testing/vitest"
}
272 changes: 0 additions & 272 deletions test/check.js

This file was deleted.

76 changes: 0 additions & 76 deletions test/create.js

This file was deleted.

90 changes: 0 additions & 90 deletions test/from.js

This file was deleted.

154 changes: 154 additions & 0 deletions test/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import crypto from 'crypto';
import fs from 'fs';

import { describe, beforeEach, it, expect } from 'vitest';

import * as ssri from '../src';

const TEST_DATA = fs.readFileSync(__filename);

function hash(data, algorithm) {
return crypto.createHash(algorithm).update(data).digest('base64');
}

describe('ssri', function () {
describe('#create', function () {
it('should generate a sha512 hash object from Buffer data', function () {
expect(ssri.create(TEST_DATA).toString()).toBe(`sha512-${hash(TEST_DATA, 'sha512')}`);
});

it('should generate a sha512 hash object from String data', function () {
expect(ssri.create(TEST_DATA.toString('utf8')).toString()).toBe(`sha512-${hash(TEST_DATA, 'sha512')}`);
});

it('should generate a sha256 hash object with `opts.algorithm`', function () {
expect(ssri.create(TEST_DATA, { algorithm: 'sha256' }).toString()).toBe(`sha256-${hash(TEST_DATA, 'sha256')}`);
});

it('should be able to add options to a hash with `opts.options', function () {
expect(
ssri
.create(TEST_DATA, {
algorithm: 'sha256',
options: ['foo', 'bar'],
})
.toString(),
).toBe(`sha256-${hash(TEST_DATA, 'sha256')}?foo?bar`);
});

it('should support transforming a Hash object into a JSON string with `JSON.stringify`', function () {
expect(JSON.stringify(ssri.create(TEST_DATA))).toBe(`"sha512-${hash(TEST_DATA, 'sha512')}"`);
});
});

describe('#parse', function () {
it('should parse an integrity string', function () {
const sha = hash(TEST_DATA, 'sha512');
const integrity = `sha512-${sha}`;
expect(Object.fromEntries(Object.entries(ssri.parse(integrity)))).toStrictEqual({
source: integrity,
digest: sha,
algorithm: 'sha512',
options: [],
});
});

it('should parse options from integrity string', function () {
const sha = hash(TEST_DATA, 'sha512');
const integrity = `sha512-${sha}?one?two?three`;
expect(Object.fromEntries(Object.entries(ssri.parse(integrity)))).toStrictEqual({
source: integrity,
digest: sha,
algorithm: 'sha512',
options: ['one', 'two', 'three'],
});
});

it('should omit unsupported algos', function () {
const xxx = new Array(50).join('x');

expect(Object.fromEntries(Object.entries(ssri.parse(`foo-${xxx}`)))).toStrictEqual({
source: `foo-${xxx}`,
algorithm: '',
digest: '',
options: [],
});

expect(Object.fromEntries(Object.entries(ssri.parse(`sha512-${xxx}`)))).toStrictEqual({
source: `sha512-${xxx}`,
algorithm: 'sha512',
digest: xxx,
options: [],
});
});

it('should discard invalid format entries', function () {
const missingDash = 'thisisbad';
const missingAlgorithm = '-deadbeef';
const missingDigest = 'sha512-';

expect(ssri.parse(missingDash).toString()).toBe('');
expect(ssri.parse(missingAlgorithm).toString()).toBe('');
expect(ssri.parse(missingDigest).toString()).toBe('');
});

it('should trim whitespace from either end', function () {
const integrity = ` sha512-${hash(TEST_DATA, 'sha512')} `;
expect(Object.fromEntries(Object.entries(ssri.parse(integrity)))).toStrictEqual({
source: integrity.trim(),
algorithm: 'sha512',
digest: hash(TEST_DATA, 'sha512'),
options: [],
});
});

it('should discard hashes that dont abide by the spec', function () {
const valid = `sha512-${hash(TEST_DATA, 'sha512')}`;
const badAlgorithm = `sha1-${hash(TEST_DATA, 'sha1')}`;
const badBase64 = 'sha512-@#$@%#$';
const badOpts = `${valid}?\x01\x02`;

expect(ssri.parse(badAlgorithm).toString()).toBe('');
expect(ssri.parse(badBase64).toString()).toBe('');
expect(ssri.parse(badOpts).toString()).toBe('');
});

it('should not allow weird stuff in sri', function () {
const badInt = 'mdc2\u0000/../../../hello_what_am_I_doing_here-Juwtg9UFssfrRfwsXu+n/Q==';

expect(ssri.parse(badInt).toString()).toBe('');
});
});

describe('#verify', function () {
let sri;

beforeEach(function () {
sri = ssri.parse(`sha512-${hash(TEST_DATA, 'sha512')}`);
});

it('should verify Buffer data', function () {
expect(ssri.verify(TEST_DATA, sri)).toBe(true);
});

it('should verify String data', function () {
expect(ssri.verify(TEST_DATA.toString('utf8'), sri)).toBe(true);
});

it('should return false when verification fails', function () {
expect(ssri.verify('nope', sri)).toBe(false);
});

it('should return false on an invalid sri hash', function () {
expect(ssri.verify('nope', 'sha512-nope')).toBe(false);
});

it('should return false on garbage sri input', function () {
expect(ssri.verify('nope', 'garbage')).toBe(false);
});

it('should return false on empty sri input', function () {
expect(ssri.verify('nope', '')).toBe(false);
});
});
});
139 changes: 0 additions & 139 deletions test/integrity-stream.js

This file was deleted.

158 changes: 0 additions & 158 deletions test/integrity.js

This file was deleted.

60 changes: 0 additions & 60 deletions test/mutable-opts-resilience.js

This file was deleted.

266 changes: 0 additions & 266 deletions test/parse.js

This file was deleted.

118 changes: 0 additions & 118 deletions test/stringify.js

This file was deleted.

7 changes: 7 additions & 0 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"noImplicitAny": false,
},
"include": ["../src/**/*", "*.ts", "**/*"],
}
13 changes: 0 additions & 13 deletions test/update.js

This file was deleted.

12 changes: 12 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"allowJs": true,
"baseUrl": "./src",
"declaration": true,
"esModuleInterop": true,
"lib": ["es2020"],
"noImplicitAny": true,
"outDir": "dist/"
},
"include": ["./src/**/*"]
}