Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into Gaspar
Browse files Browse the repository at this point in the history
  • Loading branch information
bsrobinson committed Jul 31, 2024
2 parents c279e8f + 23b2b01 commit bcd31c8
Show file tree
Hide file tree
Showing 54 changed files with 5,671 additions and 4,940 deletions.
2 changes: 1 addition & 1 deletion .c8rc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"exclude": ["Gruntfile.cjs"],
"exclude": ["cli.js"],
"tempDirectory": "temp/coverage"
}
22 changes: 0 additions & 22 deletions .eslintrc.json

This file was deleted.

6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@

# style: Format YAML files at project root
d7eacc4d28028b906e505d21101ec904d8a3ceb8

# Deindent standalone functions (in Gruntfile)
36a6cccf396db9ac67937b4d0720548aa1868f7f

# Unindent Grunt task functions
ec2eff2d4485dff86239bd32cb5fc7f5acc76a4e
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ WARNING_AspNetFiles:
gruntfile:
- changed-files:
- any-glob-to-any-file:
- 'src/Gruntfile.cjs'
- 'src/cli.js'

# schema setting change
schema-validation.json:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeowners-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: 'actions/checkout@v4'
- name: 'Run Codeowners merge check'
uses: 'fox-forks/code-owner-self-merge@hyperupcall-bug-fixes'
uses: 'OSS-Docs-Tools/code-owner-self-merge@3d0e2871b850d624a5a433fb7143fe4522ba5486'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: 'https://github.com/rbubley/mirrors-prettier'
rev: 'v3.3.2'
rev: 'v3.3.3'
hooks:
- id: 'prettier'
types_or: ['yaml', 'json', 'javascript', 'css', 'markdown']
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If you want to contribute, but not sure what needs fixing, see the [help wanted]

Schema files are located in `src/schemas/json`. Each schema file has a corresponding entry in the [Schema Catalog](src/api/json/catalog.json). Each catalog entry has a `fileMatch` field. IDEs use this field to know which files the schema should be used for (in autocompletion).

Some schema files have associated positive and negative tests, located at `src/test` and `src/negative_test`, respectively. This repository has Grunt tasks that automatically load these files and use a validator (either [AJV](https://ajv.js.org) or [SchemaSafe](https://github.com/ExodusMovement/schemasafe)) to ensure that they either pass or fail validation.
Some schema files have associated positive and negative tests, located at `src/test` and `src/negative_test`, respectively. This repository has tests that use a validator (either [AJV](https://ajv.js.org) or [SchemaSafe](https://github.com/ExodusMovement/schemasafe)), to ensure that the schemas either pass or fail validation.

There are three types of schema validation modes:

Expand Down Expand Up @@ -205,11 +205,11 @@ git clone https://github.com/SchemaStore/schemastore
cd schemastore
```

Be sure that [NodeJS](https://nodejs.org) is installed. The minimum required NodeJS version is defined by the `engines` key in [package.json](package.json). Now, install dependencies and run the `new_schema` Grunt task:
Be sure that [NodeJS](https://nodejs.org) is installed. The minimum required NodeJS version is defined by the `engines` key in [package.json](package.json). Now, install dependencies and run the `new-schema` task:

```sh
npm ci
npm run grunt new_schema
npm run new-schema
```

You will be prompted for the name of the schema. Once you enter your schema name, the task will:
Expand All @@ -218,7 +218,7 @@ You will be prompted for the name of the schema. Once you enter your schema name
- Create a positive test file at `src/test/<schemaName>/<schemaName>.json`
- Print a string for you to add to the [Schema Catalog](src/api/json/catalog.json)

If you do not wish to use the `new_schema` Grunt task, the manual steps are listed below 👇
If you do not wish to use the `new-schema` task, the manual steps are listed below 👇

<details>

Expand Down Expand Up @@ -360,16 +360,16 @@ This repository validations JSON Schemas in multiple ways:
To validate all schemas, run:

```console
npm run grunt
node ./cli.js check
```

Because there are hundreds of schemas, you may only want to validate a single one to save time. To do this, run:

```console
npm run grunt -- --SchemaName=<schemaName.json>
node ./cli.js check --SchemaName=<schemaName.json>
```

For example, to validate the [`ava.json`](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/ava.json) schema, run `npm run grunt -- --SchemaName=ava.json`
For example, to validate the [`ava.json`](https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/ava.json) schema, run `node ./cli.js check --SchemaName=ava.json`

Note that `<schemaName.json>` refers to the _filename_ that the schema has under `src/schemas/json`. If the task succeeds, your changes are valid and you can safely create a PR.

Expand Down
Loading

0 comments on commit bcd31c8

Please sign in to comment.