Explorar o código

Merge pull request #9038 from jasongrout/node10

Support node 10.x
Jason Grout %!s(int64=4) %!d(string=hai) anos
pai
achega
c902c35ea7

+ 1 - 1
.github/workflows/linuxjs-tests.yml

@@ -19,7 +19,7 @@ jobs:
       - name: Set up Node
         uses: actions/setup-node@v1
         with:
-          node-version: '12.x'
+          node-version: '10.x'
       - name: Cache pip on Linux
         uses: actions/cache@v1
         if: startsWith(runner.os, 'Linux')

+ 0 - 1
builder/package.json

@@ -53,7 +53,6 @@
     "css-loader": "~3.2.0",
     "duplicate-package-checker-webpack-plugin": "^3.0.0",
     "file-loader": "~6.0.0",
-    "fs": "~0.0.1-security",
     "fs-extra": "^9.0.1",
     "glob": "~7.1.6",
     "mini-css-extract-plugin": "~0.11.0",

+ 2 - 13
builder/src/webpack.config.ext.ts

@@ -5,7 +5,7 @@ import * as path from 'path';
 import * as webpack from 'webpack';
 import { Build } from './build';
 import { merge } from 'webpack-merge';
-import * as fs from 'fs';
+import * as fs from 'fs-extra';
 import * as glob from 'glob';
 import Ajv from 'ajv';
 import { readJSONFile, writeJSONFile } from '@jupyterlab/buildutils';
@@ -139,18 +139,7 @@ shared[data.name] = {
 
 // Ensure a clean output directory - remove files but not the directory
 // in case it is a symlink
-if (fs.existsSync(outputPath)) {
-  const outputFiles = fs.readdirSync(outputPath);
-  outputFiles.forEach(filePath => {
-    filePath = path.join(outputPath, filePath);
-    if (fs.statSync(filePath).isFile()) {
-      fs.unlinkSync(filePath);
-    } else {
-      fs.rmdirSync(filePath, { recursive: true });
-    }
-  });
-}
-fs.mkdirSync(outputPath, { recursive: true });
+fs.emptyDirSync(outputPath);
 
 const extras = Build.ensureAssets({
   packageNames: [],