From d8a54da496f5a19b65ad121490c012e8bedbc593 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 25 Jul 2023 15:31:44 +0100 Subject: [PATCH] Chore: fix build --- packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild.js | 3 +-- packages/tools/gulp/utils.js | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild.js b/packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild.js index 0dfa29d60..60e776c1f 100644 --- a/packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild.js +++ b/packages/tools/gulp/tasks/updateIgnoredTypeScriptBuild.js @@ -1,6 +1,5 @@ const utils = require('../utils'); const rootDir = utils.rootDir(); -const { globSync } = require('@joplin/utils/fs'); module.exports = { src: '', @@ -11,7 +10,7 @@ module.exports = { // // https://github.com/isaacs/node-glob/issues/371 - const tsFiles = globSync('{**/*.ts,**/*.tsx}', { + const tsFiles = utils.globSync('{**/*.ts,**/*.tsx}', { cwd: rootDir, ignore: [ '**/.git/**', diff --git a/packages/tools/gulp/utils.js b/packages/tools/gulp/utils.js index 063cd08c9..47d5ba97c 100644 --- a/packages/tools/gulp/utils.js +++ b/packages/tools/gulp/utils.js @@ -1,5 +1,6 @@ const fs = require('fs-extra'); const execa = require('execa'); +const glob = require('glob'); const utils = {}; @@ -217,4 +218,11 @@ utils.msleep = (ms) => { }); }; +utils.globSync = (pattern, options = {}) => { + let output = glob.sync(pattern, options); + output = output.map(f => f.replace(/\\/g, '/')); + output.sort(); + return output; +}; + module.exports = utils;