Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions scripts/updateProjectReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ import { getWorkspacesList } from './utils/getWorkspacesList';
const { argv } = yargs(hideBin(process.argv))
.array('read-only')
.array('ignore')
.array('typings')
.boolean('test') as any;

const readOnlyGlobs: string[] = argv.readOnly || [];
const ignoreGlobs: string[] = argv.ignore || [];
const typingPaths: string[] = argv.typings || [];
const isTesting = argv.test || false;

const prettierConfig = await getPrettierConfig();
Expand Down Expand Up @@ -70,11 +68,6 @@ import { getWorkspacesList } from './utils/getWorkspacesList';
const workspaceConfigPath = path.resolve(workspacePath, 'tsconfig.json');
const workspaceLibConfigPath = path.resolve(workspacePath, 'tsconfig.lib.json');

// actual references of the workspace = typings from argv + parsed package.json (assigned later)
const nextWorkspaceReferences = typingPaths.map((typingPath: string) => ({
path: path.relative(workspacePath, path.resolve(process.cwd(), typingPath)),
}));

const defaultWorkspaceConfig = {
extends: path.relative(workspacePath, path.resolve(process.cwd(), 'tsconfig.json')),
compilerOptions: { outDir: './libDev' },
Expand All @@ -88,6 +81,9 @@ import { getWorkspacesList } from './utils/getWorkspacesList';
// parse tsconfig.lib.json, which may not exist, and shall not be created
const workspaceLibConfig = parseTSConfigFile(workspaceLibConfigPath);

// actual references of the workspace from parsed package.json (assigned later)
const nextWorkspaceReferences: Array<{ path: string }> = [];

Object.values(workspace.workspaceDependencies).forEach(dependencyLocation => {
const dependencyPath = path.resolve(process.cwd(), dependencyLocation);
const relativeDependencyPath = path.relative(workspacePath, dependencyPath);
Expand Down