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

Remove string-prototype-matchall #60

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}