Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent exception when encountering a node of unknown type #78

Closed
wants to merge 3 commits into from
Closed

Prevent exception when encountering a node of unknown type #78

wants to merge 3 commits into from

Conversation

nicolaslt
Copy link

@michaelficarra This is a reopen of #71. I had deleted my fork so couldn't fix the original PR 😞

tests/unknownNodeType.js Outdated Show resolved Hide resolved
@okunokentaro
Copy link

I am the same. I want to fix it. 👍

Copy link
Member

@michaelficarra michaelficarra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please add missing semicolons and fix leading/trailing empty lines.

@michaelficarra
Copy link
Member

@nicolaslt can you check the box to allow edits from maintainers over on the right panel? It should look like this:

image

@michaelficarra
Copy link
Member

Never mind, I've merged as d48682f. Thanks for the contribution.

@nicolaslt
Copy link
Author

Awesome, thanks!

@michaelficarra
Copy link
Member

Btw I released 1.1.0 and @nicolaslt you should add the email address you used to make the commit to your GitHub emails if you want to have the commit properly attributed to your account.

brettz9 added a commit to brettz9/esquery that referenced this pull request Mar 1, 2020
- Update: Point redirect to `estools`
- Lint: HTML
- Build: Rollup esquery (now as dep.) and of espree (changed from esprima)
- Styling: Add minimum height to textarea
- Add `.editorconfig` and .eslintrc.js (tweaking to gh-pages needs)
- Merge npmrc, travis.yml, and README

----
Merge branch 'espree' into gh-pages

* espree: (63 commits)
  - Remove deprecated `preferGlobal`: https://docs.npmjs.com/files/package.json#preferglobal
  - Testing: Switch to more currently maintained espree
  - Breaking change: To ensure passing `nyc`, bump to Node 8 - Fix: Multiple leading decimals were not being handled correctly (produced inner     array followed by "." such that `21.` (e.g., at beginning of "21.35") would be     procssed instead as `2,1.`) - Refactoring: Avoid unnecessary code to unescape `\\a` (`\a` has no special meaning) - Maintenance: Add pegjs as 2 sp. in `.editorconfig` - Testing: Expand to effective 100% coverage
  - Enhancement: Throw for unknown operator - Testing: Switch from jstestr to mocha - Testing: Get coverage for bad operator, class name, and selector type
  - Enhancement: Add ESM distribution pointed to by `module` - Refactoring: Switch to ESM internally - Build: Ensure `dist` files are bundled in npm
  - Update: pegjs (and refactor to handle the 0.8.0 change to return `null` for `?`) - npm: Add npm scripts in place of Makefile (and remove `parser.js` upon running the parser build) - npm: Simplify to reference binary without `node_modules`
  - Breaking change: Bump to Node 4.0 (required by estraverse) - Refactoring: remove now unneed Array.isArray polyfill - npm: Update estraverse dep. minor version and devDeps.
  - Linting (ESLint): Add `node_modules` and `dist` to ignore file and unignore `.eslintrc.js`;     use "js" extension for comments; enforce `semi` rule; lint `parser.js` to catch any buggy generator issues - Linting (package.json): Add recommended fields (contributors, bugs, homepage); update repository URL - Refactoring: Fix broken or redundant HTML - Maintenance: Enforce 2 sp. for JSON in `.editorconfig` (per current `package.json`) - npm: Add build scripts (leading currently to Makefile)
  Add eslint setup (estools#80)
  Make :function matching more precise (estools#53)
  Fix global leak due to missing var declaration of l (estools#74)
  Version 1.1.0
  prevent exception when encountering a node of unknown type (estools#78)
  chore: list 'has:' pseudo-class to README (estools#77)
  fix typos
  Version 1.0.1
  Fixes estools#58: check attribute type before matching against a regexp (estools#62)
  Fix: add MetaProperty and TemplateLiteral to :expression class (estools#59)
  Add correct SPDX expression.
  Expand :has() tests
  ...

# Conflicts:
#	.gitignore
#	.travis.yml
#	README.md
#	demo.html
#	esquery.js
#	package.json
#	testRunner.html
#	tests/queryAttribute.js
#	tests/queryComplex.js
#	tests/queryCompound.js
#	tests/queryField.js
#	tests/queryMatches.js
#	tests/queryNot.js
#	tests/queryPseudoChild.js
#	tests/querySubject.js
#	tests/queryType.js
#	tests/queryWildcard.js
brettz9 added a commit to brettz9/esquery that referenced this pull request Mar 1, 2020
- Update: Point redirect to `estools`
- Lint: HTML
- Build: Rollup esquery (now as dep.) and of espree (changed from esprima)
- Styling: Add minimum height to textarea
- Add `.editorconfig` and .eslintrc.js (tweaking to gh-pages needs)
- Merge npmrc, travis.yml, and README

----
Merge branch 'espree' into gh-pages

* espree: (63 commits)
  - Remove deprecated `preferGlobal`: https://docs.npmjs.com/files/package.json#preferglobal
  - Testing: Switch to more currently maintained espree
  - Breaking change: To ensure passing `nyc`, bump to Node 8 - Fix: Multiple leading decimals were not being handled correctly (produced inner     array followed by "." such that `21.` (e.g., at beginning of "21.35") would be     procssed instead as `2,1.`) - Refactoring: Avoid unnecessary code to unescape `\\a` (`\a` has no special meaning) - Maintenance: Add pegjs as 2 sp. in `.editorconfig` - Testing: Expand to effective 100% coverage
  - Enhancement: Throw for unknown operator - Testing: Switch from jstestr to mocha - Testing: Get coverage for bad operator, class name, and selector type
  - Enhancement: Add ESM distribution pointed to by `module` - Refactoring: Switch to ESM internally - Build: Ensure `dist` files are bundled in npm
  - Update: pegjs (and refactor to handle the 0.8.0 change to return `null` for `?`) - npm: Add npm scripts in place of Makefile (and remove `parser.js` upon running the parser build) - npm: Simplify to reference binary without `node_modules`
  - Breaking change: Bump to Node 4.0 (required by estraverse) - Refactoring: remove now unneed Array.isArray polyfill - npm: Update estraverse dep. minor version and devDeps.
  - Linting (ESLint): Add `node_modules` and `dist` to ignore file and unignore `.eslintrc.js`;     use "js" extension for comments; enforce `semi` rule; lint `parser.js` to catch any buggy generator issues - Linting (package.json): Add recommended fields (contributors, bugs, homepage); update repository URL - Refactoring: Fix broken or redundant HTML - Maintenance: Enforce 2 sp. for JSON in `.editorconfig` (per current `package.json`) - npm: Add build scripts (leading currently to Makefile)
  Add eslint setup (estools#80)
  Make :function matching more precise (estools#53)
  Fix global leak due to missing var declaration of l (estools#74)
  Version 1.1.0
  prevent exception when encountering a node of unknown type (estools#78)
  chore: list 'has:' pseudo-class to README (estools#77)
  fix typos
  Version 1.0.1
  Fixes estools#58: check attribute type before matching against a regexp (estools#62)
  Fix: add MetaProperty and TemplateLiteral to :expression class (estools#59)
  Add correct SPDX expression.
  Expand :has() tests
  ...

# Conflicts:
#	.gitignore
#	.travis.yml
#	README.md
#	demo.html
#	esquery.js
#	package.json
#	testRunner.html
#	tests/queryAttribute.js
#	tests/queryComplex.js
#	tests/queryCompound.js
#	tests/queryField.js
#	tests/queryMatches.js
#	tests/queryNot.js
#	tests/queryPseudoChild.js
#	tests/querySubject.js
#	tests/queryType.js
#	tests/queryWildcard.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants