10 Commits

Author SHA1 Message Date
Gerry Ferdinandus
a67ff4a7d4 Rename Gruntfile.js to Gruntfile.cjs (#2239)
* Rename Gruntfile.js to Gruntfile.cjs

Use the CommonJS file extension

* eslint "object-shorthand" must be error not warning

The build process must not generate warning but error and stop the build.

* Present Node 16 is es2021 compatible

Future node 18 is es2022 compatible

* Update package to the latest version.

Except for "got". Must stay at version 11.
There is no newer CJS version available
2022-05-10 20:58:57 +02:00
Gerry Ferdinandus
eb9bf0715a Replace grunt-tv4 with tv-4 (#2124)
* makefile: change 'npm install' to 'npm ci'

The workstation makefile must use the package-lock.json as the server already does.

* replace grunt-tv4 with tv4

grunt-tv4 is not always able to download external file.
This will break the build server.
All build assets should now exist locally.

* Add task to detect which schema is already in full strict mode

These schemas will be added to "ajvFullStrictMode": [] list

* update "ajvFullStrictMode" with already in full strict mode schema
2022-03-07 17:41:30 +01:00
Gerry Ferdinandus
cbfcc17f80 add: grunt task 'local_coverage' (#2095)
* Add: 'js-beautify' and 'c8' in package.json

And update other package to the latest version.

* eslint must ignore generated "schema.json.translated.to.js"

* .gitignore must ignore src/temp

This directory will be autogenerated by make file "coverage"

* add: grunt task 'local_coverage'

This task will can be called via the makefile
And generate a HTML report files stored in 'src/temp/coverage/report/index.html'
2022-02-20 19:26:17 +01:00
Gerry Ferdinandus
0b6bd2a080 Add: grunt task to show schema version (#1491)
* add: .DS_Store in .gitignore

If I copy schemastore project to Linux.
The .DS_Store files show up in Linux git.

* Update http to https in the documentation

* refactor: use only one catalog, schemaV4JSON and schemaValidation

There is no need to place this all over the place.

* add: maintenance task

This task must be run via make.
There is no warrant to run this at the build process.

1) test draft-04 must not have $id
2) test if schema can be run at lower $schema draft

* add: grunt task "local_count_schema_versions"

also add the "remote_count_schema_versions"
And at the build time show all the $schema version of all the files present
Schemasave and tv4 files are both scan for this.

There is only schema version info file for the schemasafe validator
and not for grunt-tv4 task.
Because grunt-tv4 have it own dedicated print output.
2021-02-25 13:14:43 -08:00
Gerry Ferdinandus
edfdf1fceb Add grunt task: local_validate_directory_structure (#1466)
* add: grunt task local_validate_directory_structure

Check if the there are no forbidden files in the root etc.

* create netlify test folder

The test file belong in a dedicated folder and not in the 'test' root
see the wrong pr #1155

* Use fs.lstatSync(filename).isFile() and not regex

The custom build regex version is not fullproof.
Folder with format a.b is also detected as file.
As work around the folder must be created as a_b
The foldername will then be converted again from _ => .
to get the original json file that it belong to.

* rename: folder from a_b format to default a.b format

The a.b format represent the original a.b.json schema file

* Remove any reference for http in catalog

http is no longer posible in the JSON catalog

* remove redundant grunt.registerTask("schemasafe")

Just use the already present default grunt task
and remove all the other redundant task

* refactor/cleanup Gruntfile.js

Move test folder path constant to the top of the file.

refactor name: schemas -> schemasToBeTested

Remove the disabled and deprecated tv4 task.
This will reduce the file size.

* move packer.json test from root folder to test folder

pr #1217 upload packer.json to the root of schemastore.
There are no build auto detection for this type of error.
2021-02-16 09:39:09 -08:00
Gerry Ferdinandus
763b4f08e1 Grunt: add check local BOM and for duplicate key (#1305) 2020-10-13 09:30:59 -07:00
Gerry Ferdinandus
1ade2eb575 add: schemasafe JSON schema validator (#1269)
This is added as an extra validator
2020-09-30 10:20:41 -07:00
Oleg Valter
ba728efa96 build and test fix, added utility for autoparsing of README, separated contribution guidelines (#1022) 2020-04-30 08:27:20 -07:00
Sorin Sbarnea
7a597c9117 Fail execution on dirty repository (#909)
This will prevent accidents where running tests produce untracked or
modify tracked files.
2020-01-14 09:49:14 -08:00
Sorin Sbarnea
59077aa5ce Simpliyfy test instructions (#905)
Adds a Makefile for testing code in order to simplify testing from
the command line on all platforms.
2020-01-13 08:53:21 -08:00