Skip to content

Commit

Permalink
Require nohoist
Browse files Browse the repository at this point in the history
  • Loading branch information
rix0rrr committed Jan 30, 2025
1 parent 1ec353a commit 120044e
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as pj from 'projen';
import * as fs from 'fs';
import { yarn } from 'cdklabs-projen-project-types';
import { ESLINT_RULES } from './projenrc/eslint';
import { JsiiBuild } from './projenrc/jsii';
Expand Down Expand Up @@ -922,3 +923,20 @@ for (const gi of [repo.gitignore, cli.gitignore]) {
}

repo.synth();

// Until this is merged, we'll have to hack it: https://github.com/cdklabs/cdklabs-projen-project-types/pull/760
(() => {
const pj = JSON.parse(fs.readFileSync('package.json', 'utf-8'));
const bundledDeps = [
[cloudAssemblySchema, 'jsonschema'],
[cloudAssemblySchema, 'semver'],
] as const;
pj.workspaces = {
...pj.workspaces,
nohoist: bundledDeps.flatMap(([ws, name]) => [
`${ws.name}/${name}`,
`${ws.name}/${name}/**`,
])
};
fs.writeFileSync('package.json', JSON.stringify(pj, null, 2), 'utf-8');
})();
8 changes: 7 additions & 1 deletion package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 47 additions & 1 deletion yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 120044e

Please sign in to comment.