fix(core): repair sourcemaps that had file & plugin swapped (#26628)
This commit is contained in:
parent
963f753ae8
commit
8efe26c99a
@ -1772,6 +1772,60 @@ describe('project-configuration-utils', () => {
|
|||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should correctly set source maps', async () => {
|
||||||
|
const { sourceMaps } = await createProjectConfigurations(
|
||||||
|
undefined,
|
||||||
|
{},
|
||||||
|
['libs/a/project.json'],
|
||||||
|
[
|
||||||
|
new LoadedNxPlugin(fakeTargetsPlugin, 'fake-targets-plugin'),
|
||||||
|
new LoadedNxPlugin(fakeTagPlugin, 'fake-tag-plugin'),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
expect(sourceMaps).toMatchInlineSnapshot(`
|
||||||
|
{
|
||||||
|
"libs/a": {
|
||||||
|
"name": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-tag-plugin",
|
||||||
|
],
|
||||||
|
"root": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-tag-plugin",
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-tag-plugin",
|
||||||
|
],
|
||||||
|
"tags.fake-lib": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-tag-plugin",
|
||||||
|
],
|
||||||
|
"targets": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-targets-plugin",
|
||||||
|
],
|
||||||
|
"targets.build": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-targets-plugin",
|
||||||
|
],
|
||||||
|
"targets.build.executor": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-targets-plugin",
|
||||||
|
],
|
||||||
|
"targets.build.options": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-targets-plugin",
|
||||||
|
],
|
||||||
|
"targets.build.options.command": [
|
||||||
|
"libs/a/project.json",
|
||||||
|
"fake-targets-plugin",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
`);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -459,7 +459,7 @@ function mergeCreateNodesResults(
|
|||||||
> = {};
|
> = {};
|
||||||
|
|
||||||
for (const result of results.flat()) {
|
for (const result of results.flat()) {
|
||||||
const [file, pluginName, nodes] = result;
|
const [pluginName, file, nodes] = result;
|
||||||
|
|
||||||
const { projects: projectNodes, externalNodes: pluginExternalNodes } =
|
const { projects: projectNodes, externalNodes: pluginExternalNodes } =
|
||||||
nodes;
|
nodes;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user