Commit cc6f87c
committed
Install referenced schema in "npm:validate" task
The "npm:validate" task validates the repository's `package.json` npm manifest file against its JSON schema to catch any
problems with its data format.
In order to avoid duplication of content, JSON schemas may reference other schemas via the `$ref` keyword. The
`package.json` schema was recently updated to share resources with an ESLint plugins configuration schema, which caused
the validation to start failing:
schema /tmp/package-json-schema-WItZVgRyuR.json is invalid
error: can't resolve reference https://json.schemastore.org/partial-eslint-plugins.json from id https://json.schemastore.org/eslintrc.json#
task: Failed to run task "npm:validate": exit status 1
The solution is to configure the task to download that schema as well and also to provide its path to the avj-cli
validator via a `-r` flag.1 parent 49eb6f6 commit cc6f87c
File tree
2 files changed
+12
-0
lines changed- workflow-templates/assets/check-npm-task
2 files changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
740 | 744 | | |
741 | 745 | | |
742 | 746 | | |
| |||
761 | 765 | | |
762 | 766 | | |
763 | 767 | | |
| 768 | + | |
764 | 769 | | |
765 | 770 | | |
766 | 771 | | |
| |||
773 | 778 | | |
774 | 779 | | |
775 | 780 | | |
| 781 | + | |
776 | 782 | | |
777 | 783 | | |
778 | 784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
37 | 41 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | 66 | | |
| |||
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
0 commit comments