From 09656a7797fac9882262ca84fcafda9368ed64a5 Mon Sep 17 00:00:00 2001 From: Jerry Green Date: Sat, 6 Mar 2021 20:47:37 +0500 Subject: [PATCH] Transform glob entries into paths - fix https://github.com/AssemblyScript/assemblyscript/issues/1712 --- NOTICE | 3 ++- cli/asc.js | 4 +++- package.json | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NOTICE b/NOTICE index fc6a7f2a42..dd77b67022 100644 --- a/NOTICE +++ b/NOTICE @@ -33,6 +33,7 @@ under the licensing terms detailed in LICENSE: * Piotr Oleś * Saúl Cabrera * Chance Snow +* Jerry Green * Peter Salomonsen Portions of this software are derived from third-party works licensed under @@ -59,6 +60,6 @@ the following terms: The 3-Clause BSD License (https://opensource.org/licenses/BSD-3-Clause) * Arm Optimized Routines: https://github.com/ARM-software/optimized-routines - + Copyright (c) Arm Limited The MIT License (https://opensource.org/licenses/MIT) diff --git a/cli/asc.js b/cli/asc.js index 931c17a31c..c9afbe0e04 100644 --- a/cli/asc.js +++ b/cli/asc.js @@ -33,6 +33,7 @@ const fs = require("fs"); const path = require("path"); const process = require("process"); // ensure shim +const globby = require("globby"); process.exit = ((exit) => function(code) { if (code) console.log(new Error("exit " + code.toString()).stack); @@ -367,7 +368,8 @@ exports.main = function main(argv, options, callback) { // Append entries if (asconfig.entries) { - for (let entry of asconfig.entries) { + const paths = globby.sync(asconfig.entries); + for (let entry of paths) { argv.push(optionsUtil.resolvePath(entry, asconfigDir)); } } diff --git a/package.json b/package.json index 6e179c8153..10350e8a67 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ }, "dependencies": { "binaryen": "100.0.0", + "globby": "11.0.2", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0"