Skip to content

Commit

Permalink
update workflow, update dependencies,update script
Browse files Browse the repository at this point in the history
Changes:

- update workflow to run JSON Schema validator
- update `package.json` to include the validator
- update directory path to run script from root of the project
  • Loading branch information
AnimeshKumar923 committed Nov 21, 2023
1 parent 9eadb79 commit 8da18f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/if-nodejs-pr-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ jobs:
- if: steps.packagejson.outputs.exists == 'true'
name: Run release assets generation to make sure PR does not break it
run: npm run generate:assets --if-present
- if: steps.packagejson.outputs.exists == 'true'
name: Run JSON Schema Validator
run: npm run lint-schemas --if-present
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"prepublishOnly": "npm run build",
"bundle": "cd tools/bundler && npm i && npm run bundle",
"startNewVersion": "newVersion=$npm_config_new_version node scripts/add-new-version.js",
"lint": "node scripts/validate-schemas.js",
"lint": "npx eslint . --ext .js",
"lint-schemas": "node scripts/validate-schemas-final.js",
"bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/validate-schemas-final.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function validationDraft04(draft, startFileName, endFileName){
const ajv = new Ajv();

// Specify the path to the 'schemas' directory
const directoryPath = '../schemas';
const directoryPath = './schemas';


const files = fs.readdirSync(directoryPath);
Expand Down Expand Up @@ -57,7 +57,7 @@ function validation(draft, startFileName, excludedFiles){
const ajv = new Ajv();

// Specify the path to the 'schemas' directory
const directoryPath = '../schemas';
const directoryPath = './schemas';


const files = fs.readdirSync(directoryPath);
Expand Down

0 comments on commit 8da18f3

Please sign in to comment.