Skip to content

Commit

Permalink
docs(core): add comment to print affected change;
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Oct 3, 2022
1 parent 0fbff69 commit b0b8234
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
14 changes: 5 additions & 9 deletions e2e/js/src/js.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,16 +235,12 @@ describe('js e2e', () => {

runCLI(`build ${lib}`);

const rootPackageJson = readJson(`package.json`);
const swcHelpersFromRoot =
readJson(`package.json`).dependencies['@swc/helpers'];
const swcHelpersFromDist = readJson(`dist/libs/${lib}/package.json`)
.peerDependencies['@swc/helpers'];

expect(
satisfies(
readJson(`dist/libs/${lib}/package.json`).peerDependencies[
'@swc/helpers'
],
rootPackageJson.dependencies['@swc/helpers']
)
).toBeTruthy();
expect(satisfies(swcHelpersFromDist, swcHelpersFromRoot)).toBeTruthy();

updateJson(`libs/${lib}/.lib.swcrc`, (json) => {
json.jsc.externalHelpers = false;
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export const nxVersion = require('../../package.json').version;

export const esbuildVersion = '^0.15.7';
export const swcCliVersion = '~0.1.55';
export const swcHelpersVersion = '~0.3.3';
export const swcHelpersVersion = '~0.4.11';
export const typesNodeVersion = '18.7.1';
2 changes: 2 additions & 0 deletions packages/nx/src/command-line/print-affected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ async function createTasks(
function serializeProjectGraph(projectGraph: ProjectGraph) {
const nodes = Object.values(projectGraph.nodes).map((n) => n.name);
const dependencies = {};
// we don't need external dependencies' dependencies for print-affected
// having them included makes the output unreadable
Object.keys(projectGraph.dependencies).forEach((key) => {
if (!key.startsWith('npm:')) {
dependencies[key] = projectGraph.dependencies[key];
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const nxVersion = require('../../package.json').version;

export const swcLoaderVersion = '0.1.15';
export const swcHelpersVersion = '~0.3.3';
export const swcHelpersVersion = '~0.4.11';
export const tsLibVersion = '^2.3.0';

0 comments on commit b0b8234

Please sign in to comment.