From db982cf265741ebba6d999d5d08b3b22e13b2ace Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Wed, 29 Mar 2023 11:41:46 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F(frontend)=20migrate=20to=20g?= =?UTF-8?q?lob=209.3.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Glob release a new major version introducing breaking changes, so I update the way we use it to match the new API. --- packages/react/cunningham.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/cunningham.ts b/packages/react/cunningham.ts index 985a8c7..96bae41 100644 --- a/packages/react/cunningham.ts +++ b/packages/react/cunningham.ts @@ -1,5 +1,5 @@ -import { glob } from "glob"; import { defaultTokens } from "@openfun/cunningham-tokens"; +import { globSync } from "glob"; /** * This scripts dynamically imports all tokens.ts files from components and load them in a single object that will be @@ -9,7 +9,7 @@ import { defaultTokens } from "@openfun/cunningham-tokens"; * them in their own local configuration file. ( cunningham.ts|js ) */ const components: any = {}; -const files = glob.sync("src/components/**/tokens.ts"); +const files = globSync("src/components/**/tokens.ts"); files.forEach((file) => { const importPath = "./" + file.replace(/\.ts$/, ""); const matches = /^.+components\/(.+)\/tokens$/gm.exec(importPath);