diff --git a/packages/kolibri-tools/lib/alias_import_resolver.js b/packages/kolibri-tools/lib/alias_import_resolver.js index 2b764bac78a..dbd55e4f8c2 100644 --- a/packages/kolibri-tools/lib/alias_import_resolver.js +++ b/packages/kolibri-tools/lib/alias_import_resolver.js @@ -1,4 +1,4 @@ -var path = require('path'); +var path = require('node:path'); var resolve = require('resolve'); var coreAliases = require('./apiSpecExportTools').coreAliases(); var coreExternals = require('./apiSpecExportTools').coreExternals(); diff --git a/packages/kolibri-tools/lib/apiSpecExportTools.js b/packages/kolibri-tools/lib/apiSpecExportTools.js index c0279f89945..c3a5ebd64da 100644 --- a/packages/kolibri-tools/lib/apiSpecExportTools.js +++ b/packages/kolibri-tools/lib/apiSpecExportTools.js @@ -1,6 +1,6 @@ /* eslint-disable */ -const fs = require('fs'); -const path = require('path'); +const fs = require('node:fs'); +const path = require('node:path'); const resolve = require('resolve'); const espree = require('espree'); const escodegen = require('escodegen'); diff --git a/packages/kolibri-tools/lib/clean.js b/packages/kolibri-tools/lib/clean.js index 8197c0481af..fcbeea11947 100644 --- a/packages/kolibri-tools/lib/clean.js +++ b/packages/kolibri-tools/lib/clean.js @@ -1,5 +1,5 @@ -var path = require('path'); -var fs = require('fs'); +var path = require('node:path'); +var fs = require('node:fs'); var logging = require('./logging'); var deleteRecursive = function(p) { diff --git a/packages/kolibri-tools/lib/cli.js b/packages/kolibri-tools/lib/cli.js index 4a098a2d410..675565ba2ce 100755 --- a/packages/kolibri-tools/lib/cli.js +++ b/packages/kolibri-tools/lib/cli.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -const fs = require('fs'); -const path = require('path'); +const fs = require('node:fs'); +const path = require('node:path'); const program = require('commander'); const checkVersion = require('check-node-version'); const ini = require('ini'); diff --git a/packages/kolibri-tools/lib/compress.js b/packages/kolibri-tools/lib/compress.js index b4aaa471c5c..1f82874cf89 100644 --- a/packages/kolibri-tools/lib/compress.js +++ b/packages/kolibri-tools/lib/compress.js @@ -1,5 +1,5 @@ -const { constants, createGzip } = require('zlib'); -const { pipeline } = require('stream'); +const { constants, createGzip } = require('node:zlib'); +const { pipeline } = require('node:stream'); const { createReadStream, createWriteStream } = require('fs'); const logger = require('./logging'); diff --git a/packages/kolibri-tools/lib/ensureDist.js b/packages/kolibri-tools/lib/ensureDist.js index a3395bb6b8b..a981491d48e 100644 --- a/packages/kolibri-tools/lib/ensureDist.js +++ b/packages/kolibri-tools/lib/ensureDist.js @@ -1,5 +1,5 @@ -const fs = require('fs'); -const path = require('path'); +const fs = require('node:fs'); +const path = require('node:path'); function ensureDist() { fs.mkdirSync(path.resolve(__dirname, '../dist'), { recursive: true }); diff --git a/packages/kolibri-tools/lib/lint.js b/packages/kolibri-tools/lib/lint.js index 2f9aa389ee8..e0b24cb21c7 100755 --- a/packages/kolibri-tools/lib/lint.js +++ b/packages/kolibri-tools/lib/lint.js @@ -1,5 +1,5 @@ -const fs = require('fs'); -const path = require('path'); +const fs = require('node:fs'); +const path = require('node:path'); const prettier = require('prettier'); const compiler = require('vue-template-compiler'); const ESLintCLIEngine = require('eslint').CLIEngine; diff --git a/packages/kolibri-tools/lib/read_webpack_json.js b/packages/kolibri-tools/lib/read_webpack_json.js index a466221951a..b0d139e43d4 100644 --- a/packages/kolibri-tools/lib/read_webpack_json.js +++ b/packages/kolibri-tools/lib/read_webpack_json.js @@ -1,6 +1,6 @@ -const fs = require('fs'); -const execSync = require('child_process').execSync; -const path = require('path'); +const fs = require('node:fs'); +const execSync = require('node:child_process').execSync; +const path = require('node:path'); const temp = require('temp').track(); const webpack_json = path.resolve(path.dirname(__filename), './webpack_json.py'); diff --git a/packages/kolibri-tools/lib/version.js b/packages/kolibri-tools/lib/version.js index 1a9472ad771..471e112e818 100644 --- a/packages/kolibri-tools/lib/version.js +++ b/packages/kolibri-tools/lib/version.js @@ -1,5 +1,5 @@ -const fs = require('fs'); -const execSync = require('child_process').execSync; +const fs = require('node:fs'); +const execSync = require('node:child_process').execSync; const temp = require('temp').track(); const readlineSync = require('readline-sync'); const semver = require('semver'); diff --git a/packages/kolibri-tools/lib/webpack.config.plugin.js b/packages/kolibri-tools/lib/webpack.config.plugin.js index f0a51e7181d..4cd9ccb7cab 100644 --- a/packages/kolibri-tools/lib/webpack.config.plugin.js +++ b/packages/kolibri-tools/lib/webpack.config.plugin.js @@ -7,7 +7,7 @@ * to add test specific features. */ -const path = require('path'); +const path = require('node:path'); const webpack = require('webpack'); const { merge } = require('webpack-merge'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); diff --git a/packages/kolibri-tools/lib/webpackBundleTracker.js b/packages/kolibri-tools/lib/webpackBundleTracker.js index 9816af3162a..8243aa7b1fc 100644 --- a/packages/kolibri-tools/lib/webpackBundleTracker.js +++ b/packages/kolibri-tools/lib/webpackBundleTracker.js @@ -20,9 +20,9 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -const path = require('path'); -const fs = require('fs'); -const crypto = require('crypto'); +const path = require('node:path'); +const fs = require('node:fs'); +const crypto = require('node:crypto'); const defaults = require('lodash/defaults'); const assign = require('lodash/assign'); diff --git a/packages/kolibri-tools/lib/webpackRtlPlugin.js b/packages/kolibri-tools/lib/webpackRtlPlugin.js index 80a53e5749a..8ff1f942ae7 100644 --- a/packages/kolibri-tools/lib/webpackRtlPlugin.js +++ b/packages/kolibri-tools/lib/webpackRtlPlugin.js @@ -13,7 +13,7 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // Vendored and simplified from https://github.com/romainberger/webpack-rtl-plugin/blob/master/src/index.js -const path = require('path'); +const path = require('node:path'); const rtlcss = require('rtlcss'); const webpack = require('webpack');