Skip to content

Commit

Permalink
Use string.prototype.matchall shim
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcaloon committed Jun 3, 2020
1 parent e22e8f9 commit 3f7fafe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const groq = require( 'groq-js' );
const matchAll = require( 'match-all' );
const matchAll = require( 'string.prototype.matchall' );
const murmurhash = require( './murmur' );
const path = require( 'path' );
const { reporter } = require( './utils' );
Expand Down Expand Up @@ -105,7 +105,7 @@ function processJoins( query ) {

const search = `\\S+->\\w*`;
const regex = new RegExp( search, 'g' );
const matches = [ ... matchAll( processedQuery, regex ).toArray() ];
const matches = [ ... matchAll( processedQuery, regex ) ];

if( !! matches.length ) {
for( let match of matches ) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gatsby-plugin-groq",
"description": "Gatsby plugin for using GROQ in place of GraphQL",
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.10",
"author": "Kevin McAloon <[email protected]>",
"keywords": [
"gatsby"
Expand All @@ -20,7 +20,7 @@
"fs": "^0.0.1-security",
"glob": "^7.1.6",
"groq-js": "^0.1.5",
"match-all": "^1.2.5",
"normalize-path": "^3.0.0"
"normalize-path": "^3.0.0",
"string.prototype.matchall": "^4.0.2"
}
}

0 comments on commit 3f7fafe

Please sign in to comment.