Gathering detailed insights and metrics for es-check
Gathering detailed insights and metrics for es-check
Gathering detailed insights and metrics for es-check
Gathering detailed insights and metrics for es-check
@mpxjs/es-check
mpx es check
mpx-es-check
mpx es check
deepdash-es
➔ 𝐃eep extension for 𝐋odash-es: ✓ eachDeep ✓ filterDeep ✓ pickDeep ✓ omitDeep ✓ keysDeep ✓ index ✓ condenseDeep ⋮ Parent nodes tracking ⋮ Circular references check ⋮ Leaves only mode ⋮ Path as a valid js string or an array ⋮
check-es-compat
CLI tool for checking JavaScript code compatibility with target browsers and Node.js versions
Checks the version of ES in JavaScript files with simple shell commands 🏆
npm install es-check
Typescript
Module System
Min. Node Version
Node Version
NPM Version
51.2
Supply Chain
98.4
Quality
75.8
Maintenance
100
Vulnerability
100
License
Total
26,720,554
Last Day
3,335
Last Week
89,593
Last Month
439,759
Last Year
4,679,562
171 Stars
429 Commits
15 Forks
5 Watching
1 Branches
2 Contributors
Updated on 02 Dec 2024
Minified
Minified + Gzipped
JavaScript (92.28%)
Shell (7.72%)
Cumulative downloads
Total Downloads
Last day
-25.6%
3,335
Compared to previous day
Last week
7.1%
89,593
Compared to previous week
Last month
11.8%
439,759
Compared to previous month
Last year
-8.9%
4,679,562
Compared to previous year
Check JavaScript files ES version against a specified ES version 🏆
ES Check checks JavaScript files against a specified version of ECMAScript (ES) with a shell command. If a specified file's ES version doesn't match the ES version argument passed in the ES Check command, ES Check will throw an error and log the files that didn't match the check.
Ensuring that JavaScript files can pass ES Check is important in a modular and bundled world. Read more about why.
Thanks to the efforts of Anders Kaseorg, ES Check has switched to Commander! There appears to be no breaking issues but this update is being published as a major release for your ease-of-use. Please reach out with observations or pull requests features/fixes!
This update was made for security purposes—dependencies not being maintained.
Thanks to Anders for this deeper fix, to Pavel Starosek for the initial issue and support, and to Alexander Pepper for digging into this issue more!
Get Started Why ES Check? Usage Walk Through API Debugging Contributing Issues Roadmap
Install
1 2npm i es-check --save-dev # locally 3npm i es-check -g # or globally 4
Check if an array or glob of files matches a specified ES version.
<something>/*.js
.1 2es-check es5 './vendor/js/*.js' './dist/**/*.js' 3
/dist/*.js
files to see if they're ES5. It throws an error and logs files are that do not pass the check.In modern JavaScript builds, files are bundled up so they can be served in an optimized manner in the browsers. It is assumed by developers that future JavaScript—like ES8 will be transpiled (changed from future JavaScript to current JavaScript) appropriately by a tool like Babel. Sometimes there is an issue where files are not transpiled. There was no efficient way to test for files that weren't transpiled—until now. That's what ES Check does.
The images below demonstrate command line scripts and their corresponding logged results.
Pass
Fail
ES Check is run above with node commands. It can also be run within npm scripts, ci tools, or testing suites.
ES Check provides the necessities. It accepts its place as a JavaScript matcher/tester.
1 2# USAGE 3 4index.js es-check <ecmaVersion> [files...] 5
1 2<ecmaVersion> 'define the ECMAScript version to check for against a glob of JavaScript files' required 3[files...] 'a glob of files to test the ECMAScript version against' required 4
Modules Flag
1 2--module use ES modules, default false 3
Allow Hash Bang
1 2--allow-hash-bang supports files that start with hash bang, default false 3
Not
1 2--not=target1,target2 An array of file/folder names or globs that you would like to ignore. Defaults to `[]`. 3
Files
1 2--files=target1,target2 An array of file/folder names or globs to test the ECMAScript version against. Alias of [...files] argument. 3
⚠️ NOTE: This is primarily intended as a way to override the files
setting in the .escheckrc
file for specific invocations. Setting both the [...files]
argument and --files
flag is an error.
1 2-h, --help Display help 3-V, --version Display version 4--no-color Disable colors 5--quiet Quiet mode - only displays warn and error messages 6-v, --verbose Verbose mode - will also output debug messages 7
ES Check is a shell command CLI. It is run in shell tool like Terminal, ITerm, or Hyper. It takes in two arguments: an ECMAScript version (<ECMAScript version>
) and files ([files]
) in globs.
Here are some example of es check scripts that could be run:
1# globs 2es-check ./js/*.js 3 4# array of arguments 5es-check ./js/*.js ./dist/*.js
If you're using a consistent configuration, you can create a .escheckrc
file in JSON format with the ecmaVersion
and files
arguments so you can conveniently run es-check
standalone from the command line.
Here's an example of what an .escheckrc
file will look like:
1{ 2 "ecmaVersion": "es6", 3 "module": false, 4 "files": "./dist/**/*.js", 5 "not": ["./dist/skip/*.js"] 6}
⚠️ NOTE: Using command line arguments while there is an .escheckrc
file in the project directory will override the configuration values in .escheckrc
.
As of ES-Check version 2.0.2, a better debugging interface is provided. When a file errors, An error object will be logged with:
⚠️ NOTE: Error logs are from the Acorn parser while parsing JavaScript related to specific versions of ECMAScript. This means error messaging is not specific to ECMAScript version. It still offers context into parsing issues!
ES Check is a small utility using powerful tools that Isaac Z. Schlueter, Marijn Haverbeke, and Matthias Etienne built. ES Checker by Ruan YiFeng checks the JavaScript version supported within a browser at run time. ES Check offers similar feedback to ES Checker but at build time and is specific to the product that is using it. ES Check was started after reading this post about [deploying es2015 code to production today] by Philip Walton.
ES Check has 3 main dependencies: acorn, glob, and caporal. To contribute, file an issue or submit a pull request. To setup local development, run ./bin/setup.sh
or open the devcontainer in VSCode.
Map
and Object.assign
are not keywords that fail ECMAScript
compilation depending on specific versions of ECMAScript. However, they hint at additions to ECMAScript that previous version did not support.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
16 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
2 existing vulnerabilities detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
security policy file detected
Details
Reason
Found 3/10 approved changesets -- score normalized to 3
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More