From 703419abf380000f431bf023c709d3254b989c03 Mon Sep 17 00:00:00 2001 From: 4mfie <52148417+4mfie@users.noreply.github.com> Date: Mon, 24 Jun 2019 06:25:22 -0400 Subject: [PATCH 1/2] Lock `first-mate` subdependency to v7.3.0 The `highlights` package depends on a version range of the `first-mate` package, which currently resolves to v7.4.0. This version of `first-mate` depends on `oniguruma` v7.2.0. This version of `oniguruma` is broken. I am locking `first-mate` at v7.3.0, which uses the previous functioning version of `oniguruma` (v7.1.0) in order for `npm i` to complete. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index a6f960671..810151cf2 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "eslint-plugin-babel": "^4.0.1", "eslint-plugin-google-camelcase": "0.0.2", "extract-text-webpack-plugin": "^2.0.0-rc.3", + "first-mate": "7.3.0", "fs-extra": "^2.0.0", "gulp": "^3.9.1", "gulp-amphtml-validator": "1.0.2", From c04f7d7546f2a81341e7ef46508e6b17150863d3 Mon Sep 17 00:00:00 2001 From: 4mfie <52148417+4mfie@users.noreply.github.com> Date: Mon, 24 Jun 2019 06:26:50 -0400 Subject: [PATCH 2/2] Update path segment separators to be cross-platform The `npm run build` command fails on Windows 10 due to these two problematic lines, which have been updated to use a portable way of doing path segmentation. --- tasks/bundle.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tasks/bundle.js b/tasks/bundle.js index d726f1ecb..91b2d0fda 100644 --- a/tasks/bundle.js +++ b/tasks/bundle.js @@ -64,12 +64,13 @@ function collectResources(filepath, html, templateName, done) { imgs.push.apply(imgs, srcsetimgs); imgs.forEach(function(imgpath) { if (imgpath) { - let imgFile = imgpath.split('img/')[1]; + let imgFile = imgpath.split('img' + path.sep)[1]; const dest = `.archive/${templateName}/img/${imgFile}`; fs.copySync(imgpath, dest); } }); - let pathToTmpl = filepath.replace(/.*templates\/(.*)/, '\$1'); + const pathToTmplRegex = new RegExp('.*templates\\' + path.sep + '(.*)'); + let pathToTmpl = filepath.replace(pathToTmplRegex, '\$1'); pathToTmpl = pathToTmpl.replace(templateName + '/', 'templates/'); fs.copySync(filepath, `.archive/${templateName}/${pathToTmpl}`);