Sfoglia il codice sorgente

chore: Fix ui-devkit build

Michael Bromley 2 anni fa
parent
commit
80a1a3ea22

+ 8 - 9
packages/ui-devkit/package.json

@@ -26,10 +26,10 @@
     "url": "git+https://github.com/vendure-ecommerce/vendure.git"
   },
   "scripts": {
-    "build:client": "rimraf ./client && rollup -c rollup.config.js --configProduction",
+    "build:client": "rimraf ./client && rollup -c rollup.config.mjs --configProduction",
     "build:compiler": "rimraf ./compiler && tsc -p tsconfig.compiler.json",
     "build": "yarn build:client && yarn build:compiler",
-    "watch": "rimraf ./lib && rollup -c rollup.config.js -w",
+    "watch": "rimraf ./lib && rollup -c rollup.config.mjs -w",
     "lint": "tslint --fix --project ./"
   },
   "bugs": {
@@ -45,19 +45,18 @@
     "chalk": "^4.1.0",
     "chokidar": "^3.5.1",
     "fs-extra": "^10.0.0",
-    "glob": "^7.1.6",
+    "glob": "^9.2.1",
     "rxjs": "^7.5.4"
   },
   "devDependencies": {
-    "@rollup/plugin-node-resolve": "^11.2.0",
-    "@types/fs-extra": "^9.0.8",
-    "@types/glob": "^7.1.3",
+    "@rollup/plugin-node-resolve": "^15.0.1",
+    "@types/fs-extra": "^11.0.1",
     "@vendure/core": "^2.0.0-next.28",
     "rimraf": "^3.0.2",
-    "rollup": "^2.40.0",
+    "rollup": "^3.18.0",
     "rollup-plugin-terser": "^7.0.2",
-    "rollup-plugin-typescript2": "^0.30.0",
-    "tslib": "^2.1.0",
+    "rollup-plugin-typescript2": "^0.34.1",
+    "tslib": "^2.5.0",
     "typescript": "4.9.5"
   }
 }

+ 0 - 0
packages/ui-devkit/rollup.config.js → packages/ui-devkit/rollup.config.mjs


+ 2 - 2
packages/ui-devkit/src/compiler/scaffold.ts

@@ -1,7 +1,7 @@
 /* tslint:disable:no-console */
 import { spawn } from 'child_process';
 import * as fs from 'fs-extra';
-import glob from 'glob';
+import { globSync } from 'glob';
 import * as path from 'path';
 
 import {
@@ -110,7 +110,7 @@ async function copyExtensionModules(outputPath: string, extensions: AdminUiExten
         }
 
         const exclude = extension.exclude
-            .map(e => glob.sync(path.join(extension.extensionPath, e)))
+            .map(e => globSync(path.join(extension.extensionPath, e)))
             .flatMap(e => e);
         fs.copySync(extension.extensionPath, dest, {
             filter: name => name === extension.extensionPath || exclude.every(e => e !== name),

+ 5 - 5
packages/ui-devkit/src/compiler/translations.ts

@@ -1,6 +1,6 @@
 import { LanguageCode } from '@vendure/common/lib/generated-types';
 import * as fs from 'fs-extra';
-import glob from 'glob';
+import { globSync } from 'glob';
 import * as path from 'path';
 
 import { Extension, TranslationExtension, Translations } from './types';
@@ -10,9 +10,9 @@ import { logger } from './utils';
  * Given an array of extensions, returns a map of languageCode to all files specified by the
  * configured globs.
  */
-export function getAllTranslationFiles(
-    extensions: TranslationExtension[],
-): { [languageCode in LanguageCode]?: string[] } {
+export function getAllTranslationFiles(extensions: TranslationExtension[]): {
+    [languageCode in LanguageCode]?: string[];
+} {
     // First collect all globs by language
     const allTranslationsWithGlobs: { [languageCode in LanguageCode]?: string[] } = {};
     for (const extension of extensions) {
@@ -38,7 +38,7 @@ export function getAllTranslationFiles(
             continue;
         }
         for (const pattern of globs) {
-            const files = glob.sync(pattern);
+            const files = globSync(pattern);
             // tslint:disable-next-line:no-non-null-assertion
             allTranslationsWithFiles[code]!.push(...files);
         }

File diff suppressed because it is too large
+ 63 - 522
yarn.lock


Some files were not shown because too many files changed in this diff