diff --git a/lib/generate-snapshot-script.js b/lib/generate-snapshot-script.js index bc7f05a..b70fa6e 100644 --- a/lib/generate-snapshot-script.js +++ b/lib/generate-snapshot-script.js @@ -3,10 +3,11 @@ const fs = require('fs') const path = require('path') const FileRequireTransform = require('./file-require-transform') -const indentString = require('indent-string') +const indentStringImport = import('indent-string') const {SourceMapGenerator} = require('source-map') module.exports = async function (cache, options) { + const {default: indentString} = await indentStringImport // Phase 1: Starting at the main module, traverse all requires, transforming // all module references to paths relative to the base directory path and // collecting abstract syntax trees for use in generating the script in diff --git a/package-lock.json b/package-lock.json index 5428576..341c06d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "acorn": "^8.0.4", "ast-util-plus": "^0.7.1", "classic-level": "^3.0.0", - "indent-string": "^4.0.0", + "indent-string": "^5.0.0", "recast": "^0.20.4", "resolve": "^1.19.0", "source-map": "^0.7.3" @@ -1563,11 +1563,14 @@ "license": "BSD-3-Clause" }, "node_modules/indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/inflight": { diff --git a/package.json b/package.json index 2c6c05d..6842d9a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "acorn": "^8.0.4", "ast-util-plus": "^0.7.1", "classic-level": "^3.0.0", - "indent-string": "^4.0.0", + "indent-string": "^5.0.0", "recast": "^0.20.4", "resolve": "^1.19.0", "source-map": "^0.7.3"