Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Dec 10, 2024
1 parent 7fbb559 commit 8881774
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
30 changes: 29 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"graceful-fs": "^4.2.9",
"node-gyp-build": "^4.2.2",
"picomatch": "^4.0.2",
"resolve-from": "^5.0.0"
"resolve-from": "^5.0.0",
"tinyglobby": "^0.2.10"
},
"devDependencies": {
"@azure/cosmos": "^2.1.7",
Expand Down
13 changes: 5 additions & 8 deletions src/utils/sharedlib-emit.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os from 'os';
import glob from 'glob';
import { glob } from 'tinyglobby';
import { getPackageBase } from './get-package-base';
import { Job } from '../node-file-trace';

Expand All @@ -21,12 +21,9 @@ export async function sharedLibEmit(path: string, job: Job) {
const pkgPath = getPackageBase(path);
if (!pkgPath) return;

const files = await new Promise<string[]>((resolve, reject) =>
glob(
pkgPath + sharedlibGlob,
{ ignore: pkgPath + '/**/node_modules/**/*', dot: true },
(err, files) => (err ? reject(err) : resolve(files)),
),
);
const files = await glob(pkgPath + sharedlibGlob, {
ignore: pkgPath + '/**/node_modules/**/*',
dot: true,
});
await Promise.all(files.map((file) => job.emitFile(file, 'sharedlib', path)));
}

0 comments on commit 8881774

Please sign in to comment.