From c84446932b657f9b53342134386b54850c4f6ace Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Sun, 23 Jun 2024 18:35:44 -0400 Subject: [PATCH] chore(deps): Remove string-prototype-matchall --- index.js | 6 ++---- package.json | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index ab5622e..391d105 100644 --- a/index.js +++ b/index.js @@ -18,8 +18,6 @@ const { join } = require("path"); const ejs = require("ejs"); const MagicString = require("magic-string"); const json5 = require("json5"); -// See https://github.com/surma/rollup-plugin-off-main-thread/issues/49 -const matchAll = require("string.prototype.matchall"); const defaultOpts = { // A string containing the EJS template for the amd loader. If `undefined`, @@ -101,7 +99,7 @@ module.exports = function(opts = {}) { const replacementPromises = []; - for (const match of matchAll(code, workerRegexpForTransform)) { + for (const match of code.matchAll(workerRegexpForTransform)) { let [ fullMatch, partBeforeArgs, @@ -263,7 +261,7 @@ This will become a hard error in the future.`, } const ms = new MagicString(code); - for (const match of matchAll(code, workerRegexpForOutput)) { + for (const match of code.matchAll(workerRegexpForOutput)) { let [fullMatch, optionsWithCommaStr, optionsStr] = match; let options; try { diff --git a/package.json b/package.json index 74bd19b..63bf777 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "dependencies": { "ejs": "^3.1.6", "json5": "^2.2.0", - "magic-string": "^0.25.0", - "string.prototype.matchall": "^4.0.6" + "magic-string": "^0.25.0" } }