Skip to content

Commit

Permalink
Merge pull request #18 from stephenwade/master
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Apr 10, 2021
2 parents c269b64 + ae4fea9 commit ba583f5
Show file tree
Hide file tree
Showing 13 changed files with 16,281 additions and 4,869 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/check.yml
@@ -0,0 +1,42 @@
name: Check

on:
push:
branches:
- "master"
pull_request:

jobs:
main:
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest]
node-version: [15.x]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
with:
path: node_modules
key:
node_modules-${{ matrix.os }}-${{ matrix.node-version }}-${{
hashFiles('package-lock.json') }}

- name: npm ci
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci

- name: ESLint
run: npx --no-install eslint .

- name: Prettier
run: npx --no-install prettier --check .
39 changes: 39 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,39 @@
name: Test

on:
push:
branches:
- "master"
pull_request:

jobs:
main:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
node-version: [10.x, 12.x, 14.x, 15.x]

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Cache node_modules
id: cache-node_modules
uses: actions/cache@v2
with:
path: node_modules
key:
node_modules-${{ matrix.os }}-${{ matrix.node-version }}-${{
hashFiles('package-lock.json') }}

- name: npm ci
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci

- name: Jest
run: npx --no-install jest
1 change: 1 addition & 0 deletions .prettierignore
@@ -0,0 +1 @@
/test/fixtures/repro-parse-error/random.js
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

21 changes: 10 additions & 11 deletions README.md
@@ -1,4 +1,4 @@
# eslump [![Build Status][travis-badge]][travis-link]
# eslump [![Build Status][ci-badge]][ci-link]

Fuzz testing JavaScript parsers and suchlike programs.

Expand All @@ -14,7 +14,6 @@ Inspired by [esfuzz]. Powered by [shift-fuzzer] and [shift-codegen].
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Installation](#installation)
- [CLI](#cli)
- [Module](#module)
Expand Down Expand Up @@ -162,10 +161,10 @@ There are several examples in the [examples] directory.

- [acorn]
- [@babel/parser]
- [cherow]
- [espree]
- [esprima]
- [flow]
- [meriyah]
- [shift-parser]

- Code generators:
Expand Down Expand Up @@ -271,7 +270,7 @@ module.exports = ({

## Development

You need [Node.js] 10 and npm 6.
You need [Node.js] 10 and npm 7.

### npm scripts

Expand All @@ -296,10 +295,11 @@ You need [Node.js] 10 and npm 6.

<!-- prettier-ignore-start -->
[@babel/generator]: https://github.com/babel/babel/tree/master/packages/babel-generator
[@babel/parser]: https://babeljs.io/docs/en/next/babel-parser.html
[acorn]: https://github.com/ternjs/acorn
[cherow]: https://github.com/cherow/cherow
[doctoc]: https://github.com/thlorenz/doctoc/
[@babel/parser]: https://babeljs.io/docs/en/babel-parser.html
[acorn]: https://github.com/acornjs/acorn
[ci-badge]: https://github.com/lydell/eslump/actions/workflows/test.yml/badge.svg
[ci-link]: https://github.com/lydell/eslump/actions
[doctoc]: https://github.com/thlorenz/doctoc
[escodegen]: https://github.com/estools/escodegen
[esfuzz]: https://github.com/estools/esfuzz
[eslint]: https://eslint.org/
Expand All @@ -308,13 +308,12 @@ You need [Node.js] 10 and npm 6.
[examples]: https://github.com/lydell/eslump/tree/master/examples
[flow]: https://github.com/facebook/flow
[jest]: https://jestjs.io/
[meriyah]: https://github.com/meriyah/meriyah
[node.js]: https://nodejs.org/en/
[npm]: https://www.npmjs.com/
[prettier]: https://github.com/prettier/prettier/
[prettier]: https://github.com/prettier/prettier
[shift-codegen]: https://github.com/shapesecurity/shift-codegen-js
[shift-fuzzer]: https://github.com/shapesecurity/shift-fuzzer-js
[shift-parser]: https://github.com/shapesecurity/shift-parser-js
[travis-badge]: https://travis-ci.com/lydell/eslump.svg?branch=master
[travis-link]: https://travis-ci.com/lydell/eslump
[typescript]: https://github.com/Microsoft/TypeScript
<!-- prettier-ignore-end -->
4 changes: 3 additions & 1 deletion examples/acorn.js
Expand Up @@ -3,4 +3,6 @@
const acorn = require("acorn");
const testParser = require("./parser");

module.exports = testParser(acorn.parse);
const parse = (input) => acorn.parse(input, { ecmaVersion: 2020 });

module.exports = testParser(parse);
12 changes: 0 additions & 12 deletions examples/cherow.js

This file was deleted.

10 changes: 10 additions & 0 deletions examples/meriyah.js
@@ -0,0 +1,10 @@
"use strict";

const meriyah = require("meriyah");
const testParser = require("./parser");

function parse(code, { sourceType }) {
return meriyah.parse(code, { module: sourceType === "module" });
}

module.exports = testParser(parse);

0 comments on commit ba583f5

Please sign in to comment.