cleanup(core): move esbuild to use tinyglobby (#29453)
This commit is contained in:
parent
1a85efca48
commit
c6e9565973
@ -14,6 +14,10 @@
|
|||||||
{
|
{
|
||||||
"name": "fs-extra",
|
"name": "fs-extra",
|
||||||
"message": "Please use equivalent utilities from `node:fs` instead."
|
"message": "Please use equivalent utilities from `node:fs` instead."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fast-glob",
|
||||||
|
"message": "Please use `tinyglobby` in place of `fast-glob` for executing glob traversals"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nx/devkit": "file:../devkit",
|
"@nx/devkit": "file:../devkit",
|
||||||
"@nx/js": "file:../js",
|
"@nx/js": "file:../js",
|
||||||
"fast-glob": "3.2.7",
|
"tinyglobby": "^0.2.10",
|
||||||
"picocolors": "^1.1.0",
|
"picocolors": "^1.1.0",
|
||||||
"tsconfig-paths": "^4.1.2",
|
"tsconfig-paths": "^4.1.2",
|
||||||
"tslib": "^2.3.0"
|
"tslib": "^2.3.0"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { ExecutorContext, readJsonFile } from '@nx/devkit';
|
import { ExecutorContext, readJsonFile } from '@nx/devkit';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as glob from 'fast-glob';
|
import { globSync } from 'tinyglobby';
|
||||||
|
|
||||||
export interface GetEntryPointsOptions {
|
export interface GetEntryPointsOptions {
|
||||||
recursive?: boolean;
|
recursive?: boolean;
|
||||||
@ -50,12 +50,11 @@ export function getEntryPoints(
|
|||||||
const tsconfig = readJsonFile(
|
const tsconfig = readJsonFile(
|
||||||
path.join(project.data.root, foundTsConfig)
|
path.join(project.data.root, foundTsConfig)
|
||||||
);
|
);
|
||||||
const projectFiles = glob
|
const projectFiles = globSync(tsconfig.include ?? [], {
|
||||||
.sync(tsconfig.include ?? [], {
|
cwd: project.data.root,
|
||||||
cwd: project.data.root,
|
ignore: tsconfig.exclude ?? [],
|
||||||
ignore: tsconfig.exclude ?? [],
|
expandDirectories: false,
|
||||||
})
|
}).map((f) => path.join(project.data.root, f));
|
||||||
.map((f) => path.join(project.data.root, f));
|
|
||||||
|
|
||||||
projectFiles.forEach((f) => entryPoints.add(f));
|
projectFiles.forEach((f) => entryPoints.add(f));
|
||||||
options?.onProjectFilesMatched?.(projectName, projectFiles);
|
options?.onProjectFilesMatched?.(projectName, projectFiles);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../../dist/out-tsc",
|
"outDir": "../../dist/out-tsc",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"types": []
|
"types": ["node"]
|
||||||
},
|
},
|
||||||
"include": ["**/*.ts"],
|
"include": ["**/*.ts"],
|
||||||
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
|
"exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user