From 18a93f06b632be051b9455e32a85e4e75066f52c Mon Sep 17 00:00:00 2001 From: nlf Date: Thu, 28 Jan 2021 12:52:05 -0800 Subject: [PATCH] ssri@8.0.1 --- node_modules/ssri/CHANGELOG.md | 7 +++++++ node_modules/ssri/index.js | 5 +++-- node_modules/ssri/package.json | 6 +++--- package-lock.json | 14 +++++++------- package.json | 2 +- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/node_modules/ssri/CHANGELOG.md b/node_modules/ssri/CHANGELOG.md index 822e8506e7c63..3fea458e92ddf 100644 --- a/node_modules/ssri/CHANGELOG.md +++ b/node_modules/ssri/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [8.0.1](https://github.com/npm/ssri/compare/v8.0.0...v8.0.1) (2021-01-27) + + +### Bug Fixes + +* simplify regex for strict mode, add tests ([76e2233](https://github.com/npm/ssri/commit/76e223317d971f19e4db8191865bdad5edee40d2)) + ## [8.0.0](https://github.com/npm/ssri/compare/v7.1.0...v8.0.0) (2020-02-18) diff --git a/node_modules/ssri/index.js b/node_modules/ssri/index.js index 950548cf28f2e..2b309849c012a 100644 --- a/node_modules/ssri/index.js +++ b/node_modules/ssri/index.js @@ -9,7 +9,7 @@ const SPEC_ALGORITHMS = ['sha256', 'sha384', 'sha512'] // rather than [a-z0-9]. const BASE64_REGEX = /^[a-z0-9+/]+(?:=?=?)$/i const SRI_REGEX = /^([a-z0-9]+)-([^?]+)([?\S*]*)$/ -const STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/ +const STRICT_SRI_REGEX = /^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/ const VCHAR_REGEX = /^[\x21-\x7E]+$/ const defaultOpts = { @@ -24,7 +24,8 @@ const defaultOpts = { const ssriOpts = (opts = {}) => ({ ...defaultOpts, ...opts }) -const getOptString = options => !options || !options.length ? '' +const getOptString = options => !options || !options.length + ? '' : `?${options.join('?')}` const _onEnd = Symbol('_onEnd') diff --git a/node_modules/ssri/package.json b/node_modules/ssri/package.json index aece8a6fbbd1d..4af1a3c4c2e4f 100644 --- a/node_modules/ssri/package.json +++ b/node_modules/ssri/package.json @@ -1,6 +1,6 @@ { "name": "ssri", - "version": "8.0.0", + "version": "8.0.1", "description": "Standard Subresource Integrity library -- parses, serializes, generates, and verifies integrity metadata according to the SRI spec.", "main": "index.js", "files": [], @@ -42,8 +42,8 @@ "minipass": "^3.1.1" }, "devDependencies": { - "standard": "^14.3.1", - "standard-version": "^7.1.0", + "standard": "^16.0.3", + "standard-version": "^9.1.0", "tap": "^14.10.6" }, "engines": { diff --git a/package-lock.json b/package-lock.json index 736403aedd670..c3b9b8ef45a74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -417,7 +417,7 @@ "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.4", - "ssri": "^8.0.0", + "ssri": "^8.0.1", "tar": "^6.1.0", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", @@ -6441,9 +6441,9 @@ } }, "node_modules/ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "inBundle": true, "dependencies": { "minipass": "^3.1.1" @@ -14167,9 +14167,9 @@ } }, "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "requires": { "minipass": "^3.1.1" } diff --git a/package.json b/package.json index 17e29bec38314..11dc23dcefa7d 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "readdir-scoped-modules": "^1.1.0", "rimraf": "^3.0.2", "semver": "^7.3.4", - "ssri": "^8.0.0", + "ssri": "^8.0.1", "tar": "^6.1.0", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0",