Skip to content

Commit

Permalink
Fix - added match all support for older node environments
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcaloon committed May 28, 2020
1 parent d35433c commit 9d24a4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const groq = require( 'groq-js' );
const matchAll = require( 'match-all' );
const murmurhash = require( './murmur' );
const path = require( 'path' );
const { reporter } = require( './utils' );
Expand Down Expand Up @@ -104,7 +105,7 @@ function processJoins( query ) {

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

if( !! matches.length ) {
for( let match of matches ) {
Expand Down
3 changes: 2 additions & 1 deletion 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.7",
"version": "1.0.0-alpha.8",
"author": "Kevin McAloon <[email protected]>",
"keywords": [
"gatsby"
Expand All @@ -20,6 +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"
}
}

0 comments on commit 9d24a4f

Please sign in to comment.