1
0
Fork 0

update: js-yaml and js-yaml-schema

BREAKING CHANGE: includes all breaking changes from
js-yaml v4 and readonly include options from js-yaml-schema.
This is breaking because documents may parse differently,
but the API of this library has not changed.
This commit is contained in:
ssube 2021-03-28 21:06:08 -05:00
parent 27fe723d99
commit c2dbfff72b
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 67 additions and 66 deletions

View File

@ -11,9 +11,9 @@
"author": "ssube",
"license": "MIT",
"devDependencies": {
"@apextoaster/js-config": "0.1.2-11",
"@apextoaster/js-config": "0.2.0-0",
"@apextoaster/js-utils": "0.2.1",
"@apextoaster/js-yaml-schema": "0.4.0-3",
"@apextoaster/js-yaml-schema": "0.4.0-4",
"@gitbeaker/browser": "23.5.0",
"@gitbeaker/core": "23.5.0",
"@gitbeaker/node": "23.5.0",
@ -31,7 +31,7 @@
"@types/bunyan": "1.8.6",
"@types/chai": "4.2.15",
"@types/chai-as-promised": "7.1.3",
"@types/js-yaml": "3.12.6",
"@types/js-yaml": "4.0.0",
"@types/lodash": "4.14.168",
"@types/mocha": "8.2.2",
"@types/react": "17.0.3",
@ -47,7 +47,7 @@
"bunyan": "1.8.15",
"chai": "4.3.4",
"chai-as-promised": "7.1.1",
"eslint": "7.23.0",
"eslint": "^7.23.0",
"eslint-plugin-chai": "0.0.1",
"eslint-plugin-chai-expect": "2.2.0",
"eslint-plugin-chai-expect-keywords": "2.1.0",
@ -57,6 +57,7 @@
"eslint-plugin-sonarjs": "0.6.0",
"esm": "3.2.25",
"husky": "4.3.8",
"js-yaml": "^4.0.0",
"jsdom": "16.5.2",
"jsdom-global": "3.0.2",
"lodash": "4.17.21",

View File

@ -2,7 +2,7 @@ import { createConfig } from '@apextoaster/js-config';
import { IncludeOptions } from '@apextoaster/js-yaml-schema';
import Ajv from 'ajv';
import { existsSync, readFileSync, realpathSync } from 'fs';
import { DEFAULT_SAFE_SCHEMA } from 'js-yaml';
import { DEFAULT_SCHEMA } from 'js-yaml';
import { LogLevel } from 'noicejs';
import { join } from 'path';
@ -103,5 +103,5 @@ export const SCHEMA_OPTIONS: IncludeOptions = {
join,
read: readFileSync,
resolve: realpathSync,
schema: DEFAULT_SAFE_SCHEMA,
schema: DEFAULT_SCHEMA,
};

View File

@ -1,6 +1,6 @@
import { IncludeOptions } from '@apextoaster/js-yaml-schema';
import { expect } from 'chai';
import { DEFAULT_SAFE_SCHEMA } from 'js-yaml';
import { DEFAULT_SCHEMA } from 'js-yaml';
import { match, stub } from 'sinon';
import { initConfig } from '../../src/config';
@ -19,7 +19,7 @@ logger:
projects: []
`),
resolve: stub(),
schema: DEFAULT_SAFE_SCHEMA,
schema: DEFAULT_SCHEMA,
};
const config = await initConfig(path, include);
@ -36,7 +36,7 @@ logger: []
projects: {}
`),
resolve: stub(),
schema: DEFAULT_SAFE_SCHEMA,
schema: DEFAULT_SCHEMA,
};
await expect(initConfig('./invalid.yml', include)).to.eventually.be.rejectedWith(Error);
@ -51,7 +51,7 @@ projects: {}
join: stub().returnsArg(0),
read: stub().throws(err),
resolve: stub(),
schema: DEFAULT_SAFE_SCHEMA,
schema: DEFAULT_SCHEMA,
};
await expect(initConfig('.fake', include)).to.eventually.be.rejectedWith(Error);

112
yarn.lock
View File

@ -2,20 +2,20 @@
# yarn lockfile v1
"@apextoaster/js-config@0.1.2-11":
version "0.1.2-11"
resolved "https://registry.yarnpkg.com/@apextoaster/js-config/-/js-config-0.1.2-11.tgz#bb092a8971764031f95f3767b08c8a61e53a7fa7"
integrity sha512-9IXAReRp8O0y9fLkZtCpdnJqtlrAhagnh1gtp2geVL3G7ZTkfu0EMoWJpg1RxgIBTDbx9taUNqOJxWwrjb6DqQ==
"@apextoaster/js-config@0.2.0-0":
version "0.2.0-0"
resolved "https://artifacts.apextoaster.com/repository/group-npm/@apextoaster/js-config/-/js-config-0.2.0-0.tgz#91d9d4f8e078de70f0db2fbfadbca1bfbb4885c5"
integrity sha512-P9fQpkCODC/WrfaHr9qrbEfl+gqgauh/5nxyxS1rY8YhqkijYF0bgp0f9fzunGNPzk6HCTK/hGTT215DYuP0cQ==
"@apextoaster/js-utils@0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@apextoaster/js-utils/-/js-utils-0.2.1.tgz#8488b454e528a50b942afa65630099bd072e5e3e"
integrity sha512-VrrIU1AiEv7Uq958QREm7gthLF/8FU9Y1PTPXunzmdZqPVMkCKYjMyklKtNmYeXeMBnsNHFETuZmTNUynZfxjQ==
"@apextoaster/js-yaml-schema@0.4.0-3":
version "0.4.0-3"
resolved "https://registry.yarnpkg.com/@apextoaster/js-yaml-schema/-/js-yaml-schema-0.4.0-3.tgz#f6a6222b588ab04270dd2806f7e72b145ebc8245"
integrity sha512-QpM5LUrVpGJk3cUxLxQjs8mXNcwipts1ul75+YMTgiIo6rmYO5/0HZg0RF5C7nLcxzVEkcCytct9TNbXnftuwQ==
"@apextoaster/js-yaml-schema@0.4.0-4":
version "0.4.0-4"
resolved "https://artifacts.apextoaster.com/repository/group-npm/@apextoaster/js-yaml-schema/-/js-yaml-schema-0.4.0-4.tgz#fe9aa034f94a395b8c7eb62b638883a8bc6cbe7d"
integrity sha512-StRuVWApi4O5esIoEeMfYIImK821OcMTiJ2siihQKJgXAc/HDWuAEeq0K0DgZBZP0lHjEuFOheeDNHeCLNH/fA==
"@babel/code-frame@7.12.11":
version "7.12.11"
@ -807,10 +807,10 @@
resolved "https://artifacts.apextoaster.com/repository/group-npm/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a"
integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A==
"@types/js-yaml@3.12.6":
version "3.12.6"
resolved "https://artifacts.apextoaster.com/repository/group-npm/@types/js-yaml/-/js-yaml-3.12.6.tgz#7f10c926aa41e189a2755c4c7fcf8e4573bd7ac1"
integrity sha512-cK4XqrLvP17X6c0C8n4iTbT59EixqyXL3Fk8/Rsk4dF3oX4dg70gYUXrXVUUHpnsGMPNlTQMqf+TVmNPX6FmSQ==
"@types/js-yaml@4.0.0":
version "4.0.0"
resolved "https://artifacts.apextoaster.com/repository/group-npm/@types/js-yaml/-/js-yaml-4.0.0.tgz#d1a11688112091f2c711674df3a65ea2f47b5dfb"
integrity sha512-4vlpCM5KPCL5CfGmTbpjwVKbISRYhduEJvvUWsH5EB7QInhEj94XPZ3ts/9FPiLZFqYO0xoW4ZL8z2AabTGgJA==
"@types/json-schema@^7.0.3":
version "7.0.5"
@ -2300,49 +2300,6 @@ eslint-visitor-keys@^2.0.0:
resolved "https://artifacts.apextoaster.com/repository/group-npm/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8"
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
eslint@7.23.0:
version "7.23.0"
resolved "https://artifacts.apextoaster.com/repository/group-npm/eslint/-/eslint-7.23.0.tgz#8d029d252f6e8cf45894b4bee08f5493f8e94325"
integrity sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==
dependencies:
"@babel/code-frame" "7.12.11"
"@eslint/eslintrc" "^0.4.0"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.0.1"
doctrine "^3.0.0"
enquirer "^2.3.5"
eslint-scope "^5.1.1"
eslint-utils "^2.1.0"
eslint-visitor-keys "^2.0.0"
espree "^7.3.1"
esquery "^1.4.0"
esutils "^2.0.2"
file-entry-cache "^6.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.0.0"
globals "^13.6.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash "^4.17.21"
minimatch "^3.0.4"
natural-compare "^1.4.0"
optionator "^0.9.1"
progress "^2.0.0"
regexpp "^3.1.0"
semver "^7.2.1"
strip-ansi "^6.0.0"
strip-json-comments "^3.1.0"
table "^6.0.4"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
eslint@^6.0.0:
version "6.8.0"
resolved "https://artifacts.apextoaster.com/repository/group-npm/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb"
@ -2386,6 +2343,49 @@ eslint@^6.0.0:
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
eslint@^7.23.0:
version "7.23.0"
resolved "https://artifacts.apextoaster.com/repository/group-npm/eslint/-/eslint-7.23.0.tgz#8d029d252f6e8cf45894b4bee08f5493f8e94325"
integrity sha512-kqvNVbdkjzpFy0XOszNwjkKzZ+6TcwCQ/h+ozlcIWwaimBBuhlQ4nN6kbiM2L+OjDcznkTJxzYfRFH92sx4a0Q==
dependencies:
"@babel/code-frame" "7.12.11"
"@eslint/eslintrc" "^0.4.0"
ajv "^6.10.0"
chalk "^4.0.0"
cross-spawn "^7.0.2"
debug "^4.0.1"
doctrine "^3.0.0"
enquirer "^2.3.5"
eslint-scope "^5.1.1"
eslint-utils "^2.1.0"
eslint-visitor-keys "^2.0.0"
espree "^7.3.1"
esquery "^1.4.0"
esutils "^2.0.2"
file-entry-cache "^6.0.1"
functional-red-black-tree "^1.0.1"
glob-parent "^5.0.0"
globals "^13.6.0"
ignore "^4.0.6"
import-fresh "^3.0.0"
imurmurhash "^0.1.4"
is-glob "^4.0.0"
js-yaml "^3.13.1"
json-stable-stringify-without-jsonify "^1.0.1"
levn "^0.4.1"
lodash "^4.17.21"
minimatch "^3.0.4"
natural-compare "^1.4.0"
optionator "^0.9.1"
progress "^2.0.0"
regexpp "^3.1.0"
semver "^7.2.1"
strip-ansi "^6.0.0"
strip-json-comments "^3.1.0"
table "^6.0.4"
text-table "^0.2.0"
v8-compile-cache "^2.0.3"
esm@3.2.25:
version "3.2.25"
resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
@ -3462,7 +3462,7 @@ jju@~1.4.0:
resolved "https://artifacts.apextoaster.com/repository/group-npm/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
js-yaml@4.0.0:
js-yaml@4.0.0, js-yaml@^4.0.0:
version "4.0.0"
resolved "https://artifacts.apextoaster.com/repository/group-npm/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==