Upgrade js-yaml to 4.0

The only code change is switching `safeLoad` (which was removed) for `load` (which is "safe" by default now)

https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md#400---2021-01-03
This commit is contained in:
Patrick Ellis
2021-06-04 23:30:19 -04:00
parent f6dc3df7ab
commit 3424206184
5 changed files with 2813 additions and 3755 deletions

View File

@@ -1,6 +1,6 @@
---
name: js-yaml
version: 3.13.1
version: 4.1.0
type: npm
summary:
homepage:
@@ -29,8 +29,4 @@ licenses:
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
- sources: README.md
text: |-
View the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file
(MIT).
notices: []

5486
dist/index.js vendored

File diff suppressed because it is too large Load Diff

1070
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,7 +24,7 @@
"dependencies": {
"@actions/core": "^1.2.4",
"@actions/github": "^2.2.0",
"js-yaml": "^3.13.1",
"js-yaml": "^4.1.0",
"minimatch": "^3.0.4",
"semver": "^6.1.1"
},
@@ -33,7 +33,7 @@
"@types/node": "^12.0.4",
"@types/semver": "^6.0.0",
"@types/minimatch": "^3.0.0",
"@types/js-yaml": "^3.12.1",
"@types/js-yaml": "^4.0.1",
"@vercel/ncc": "^0.23.0",
"jest": "^27.0.4",
"prettier": "^2.3.0",

View File

@@ -101,7 +101,7 @@ async function getLabelGlobs(
);
// loads (hopefully) a `{[label:string]: string | StringOrMatchConfig[]}`, but is `any`:
const configObject: any = yaml.safeLoad(configurationContent);
const configObject: any = yaml.load(configurationContent);
// transform `any` => `Map<string,StringOrMatchConfig[]>` or throw if yaml is malformed:
return getLabelGlobMapFromObject(configObject);