Bump packages to fix linter
This commit is contained in:
parent
ed9506bbaf
commit
0a11e3fdd9
6063 changed files with 378752 additions and 306784 deletions
27
node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml
generated
vendored
Normal file
27
node_modules/@humanwhocodes/object-schema/.github/workflows/nodejs-test.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Node CI
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, macOS-latest, ubuntu-latest]
|
||||
node: [8.x, 10.x, 12.x, 14.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: npm install, build, and test
|
||||
run: |
|
||||
npm install
|
||||
npm run build --if-present
|
||||
npm test
|
||||
env:
|
||||
CI: true
|
||||
39
node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml
generated
vendored
Normal file
39
node_modules/@humanwhocodes/object-schema/.github/workflows/release-please.yml
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
name: release-please
|
||||
jobs:
|
||||
release-please:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: GoogleCloudPlatform/release-please-action@v2
|
||||
id: release
|
||||
with:
|
||||
release-type: node
|
||||
package-name: test-release-please
|
||||
# The logic below handles the npm publication:
|
||||
- uses: actions/checkout@v2
|
||||
# these if statements ensure that a publication only occurs when
|
||||
# a new release is created:
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
- run: npm ci
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
- run: npm publish
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
|
||||
# Tweets out release announcement
|
||||
- run: 'npx @humanwhocodes/tweet "Object Schema v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released!\n\n${{ github.event.release.html_url }}"'
|
||||
if: ${{ steps.release.outputs.release_created }}
|
||||
env:
|
||||
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
|
||||
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
|
||||
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
|
||||
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
|
||||
14
node_modules/@humanwhocodes/object-schema/.travis.yml
generated
vendored
14
node_modules/@humanwhocodes/object-schema/.travis.yml
generated
vendored
|
|
@ -1,14 +0,0 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "8"
|
||||
- "9"
|
||||
- "10"
|
||||
- "11"
|
||||
sudo: false
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
# Run npm test always
|
||||
script:
|
||||
- "npm test"
|
||||
8
node_modules/@humanwhocodes/object-schema/CHANGELOG.md
generated
vendored
Normal file
8
node_modules/@humanwhocodes/object-schema/CHANGELOG.md
generated
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
### [1.2.1](https://www.github.com/humanwhocodes/object-schema/compare/v1.2.0...v1.2.1) (2021-11-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Never return original object from individual config ([5463c5c](https://www.github.com/humanwhocodes/object-schema/commit/5463c5c6d2cb35a7b7948dffc37c899a41d1775f))
|
||||
4
node_modules/@humanwhocodes/object-schema/package.json
generated
vendored
4
node_modules/@humanwhocodes/object-schema/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@humanwhocodes/object-schema",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"description": "An object schema merger/validator",
|
||||
"main": "src/index.js",
|
||||
"directories": {
|
||||
|
|
@ -30,4 +30,4 @@
|
|||
"eslint": "^5.13.0",
|
||||
"mocha": "^5.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
8
node_modules/@humanwhocodes/object-schema/src/object-schema.js
generated
vendored
8
node_modules/@humanwhocodes/object-schema/src/object-schema.js
generated
vendored
|
|
@ -104,12 +104,8 @@ class ObjectSchema {
|
|||
const schema = new ObjectSchema(definitions[key].schema);
|
||||
definitions[key] = {
|
||||
...definitions[key],
|
||||
merge(first, second) {
|
||||
if (first && second) {
|
||||
return schema.merge(first, second);
|
||||
}
|
||||
|
||||
return MergeStrategy.assign(first, second);
|
||||
merge(first = {}, second = {}) {
|
||||
return schema.merge(first, second);
|
||||
},
|
||||
validate(value) {
|
||||
ValidationStrategy.object(value);
|
||||
|
|
|
|||
83
node_modules/@humanwhocodes/object-schema/tests/object-schema.js
generated
vendored
83
node_modules/@humanwhocodes/object-schema/tests/object-schema.js
generated
vendored
|
|
@ -266,6 +266,53 @@ describe("ObjectSchema", () => {
|
|||
assert.strictEqual(result.name.last, "z");
|
||||
});
|
||||
|
||||
it("should return separate objects when using subschema", () => {
|
||||
|
||||
schema = new ObjectSchema({
|
||||
age: {
|
||||
merge: "replace",
|
||||
validate: "number"
|
||||
},
|
||||
address: {
|
||||
schema: {
|
||||
street: {
|
||||
schema: {
|
||||
number: {
|
||||
merge: "replace",
|
||||
validate: "number"
|
||||
},
|
||||
streetName: {
|
||||
merge: "replace",
|
||||
validate: "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
state: {
|
||||
merge: "replace",
|
||||
validate: "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const baseObject = {
|
||||
address: {
|
||||
street: {
|
||||
number: 100,
|
||||
streetName: "Foo St"
|
||||
},
|
||||
state: "HA"
|
||||
}
|
||||
};
|
||||
|
||||
const result = schema.merge(baseObject, {
|
||||
age: 29
|
||||
});
|
||||
|
||||
assert.notStrictEqual(result.address.street, baseObject.address.street);
|
||||
assert.deepStrictEqual(result.address, baseObject.address);
|
||||
});
|
||||
|
||||
it("should not error when calling the merge strategy when there's a subschema and no matching key in second object", () => {
|
||||
|
||||
schema = new ObjectSchema({
|
||||
|
|
@ -295,6 +342,42 @@ describe("ObjectSchema", () => {
|
|||
assert.strictEqual(result.name.last, "z");
|
||||
});
|
||||
|
||||
it("should not error when calling the merge strategy when there's multiple subschemas and no matching key in second object", () => {
|
||||
|
||||
schema = new ObjectSchema({
|
||||
user: {
|
||||
schema: {
|
||||
name: {
|
||||
schema: {
|
||||
first: {
|
||||
merge: "replace",
|
||||
validate: "string"
|
||||
},
|
||||
last: {
|
||||
merge: "replace",
|
||||
validate: "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const result = schema.merge({
|
||||
user: {
|
||||
name: {
|
||||
first: "n",
|
||||
last: "z"
|
||||
}
|
||||
}
|
||||
}, {
|
||||
});
|
||||
|
||||
assert.strictEqual(result.user.name.first, "n");
|
||||
assert.strictEqual(result.user.name.last, "z");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue