From 3f7fafe29f7249a7729c0d6f06f6c7e9e8f6d51f Mon Sep 17 00:00:00 2001 From: Kevin Date: Wed, 3 Jun 2020 16:43:34 -0400 Subject: [PATCH] Use string.prototype.matchall shim --- index.js | 4 ++-- package.json | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 314736b..8d9c6d1 100644 --- a/index.js +++ b/index.js @@ -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' ); @@ -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 ) { diff --git a/package.json b/package.json index 9695c57..b01f3c3 100644 --- a/package.json +++ b/package.json @@ -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 ", "keywords": [ "gatsby" @@ -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" } }