fix(core): create nodes plugin fixes (#20134)
This commit is contained in:
parent
b4faf2dd3b
commit
dc51a90745
@ -54,7 +54,7 @@ export function replaceProjectConfigurationsWithPlugin<T = unknown>(
|
|||||||
for (const [targetName, targetConfig] of Object.entries(node.targets)) {
|
for (const [targetName, targetConfig] of Object.entries(node.targets)) {
|
||||||
const targetFromProjectConfig = projectConfig.targets[targetName];
|
const targetFromProjectConfig = projectConfig.targets[targetName];
|
||||||
|
|
||||||
if (targetFromProjectConfig.executor !== targetConfig.executor) {
|
if (targetFromProjectConfig?.executor !== targetConfig.executor) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export const createNodes: CreateNodes<EslintPluginOptions> = [
|
|||||||
const projectRoot = dirname(configFilePath);
|
const projectRoot = dirname(configFilePath);
|
||||||
|
|
||||||
// Do not create a project if package.json and project.json isn't there.
|
// Do not create a project if package.json and project.json isn't there.
|
||||||
const siblingFiles = readdirSync(projectRoot);
|
const siblingFiles = readdirSync(join(context.workspaceRoot, projectRoot));
|
||||||
if (
|
if (
|
||||||
!siblingFiles.includes('package.json') &&
|
!siblingFiles.includes('package.json') &&
|
||||||
!siblingFiles.includes('project.json')
|
!siblingFiles.includes('project.json')
|
||||||
|
|||||||
@ -22,7 +22,7 @@ export const createNodes: CreateNodes<<%= className %>PluginOptions> = [
|
|||||||
const projectRoot = dirname(configFilePath);
|
const projectRoot = dirname(configFilePath);
|
||||||
|
|
||||||
// Do not create a project if package.json and project.json isn't there.
|
// Do not create a project if package.json and project.json isn't there.
|
||||||
const siblingFiles = readdirSync(projectRoot);
|
const siblingFiles = readdirSync(join(context.workspaceRoot, projectRoot));
|
||||||
if (
|
if (
|
||||||
!siblingFiles.includes('package.json') &&
|
!siblingFiles.includes('package.json') &&
|
||||||
!siblingFiles.includes('project.json')
|
!siblingFiles.includes('project.json')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user