Skip to content

Commit

Permalink
chore: remove dependency on jsii-srcmak
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed May 6, 2024
1 parent 585a8be commit dd550a1
Show file tree
Hide file tree
Showing 9 changed files with 353 additions and 85 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-depcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: "Run Depcheck"
run: |
npx lerna exec --scope '${{ matrix.package }}' -- npx -y depcheck --ignores="@types/*,jsii,jsii-pacmak,jsii-srcmak,jsii-docgen,yoga-layout-prebuilt,eslint,jest,tsc-files,typescript,esbuild,esbuild-jest,graphology-types"
npx lerna exec --scope '${{ matrix.package }}' -- npx -y depcheck --ignores="@types/*,jsii,jsii-pacmak,jsii-docgen,yoga-layout-prebuilt,eslint,jest,tsc-files,typescript,esbuild,esbuild-jest,graphology-types"
4 changes: 2 additions & 2 deletions .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
# Upgrade all the packages
lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --filter=@types/node,@types/fs-extra --target=minor
lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --filter=typescript --target=patch
lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,graphology-types,jsii,jsii-srcmak,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,${{ steps.list-packages.outputs.list }}' --target=minor
lerna exec --scope='{${{ join(matrix.pr.packages, ',') }}}' ncu -- --upgrade --reject='@types/node,@types/fs-extra,constructs,typescript,graphology-types,jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,${{ steps.list-packages.outputs.list }}' --target=minor
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn upgrade" to run)
- name: Run "yarn install"
run: yarn install --prefer-offline
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
- name: Run "ncu -u"
run: |-
# Upgrade all the packages
lerna exec ncu -- --upgrade --filter='jsii,jsii-srcmak,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,constructs' --target=minor
lerna exec ncu -- --upgrade --filter='jsii,jsii-pacmak,jsii-rosetta,jsii-docgen,codemaker,constructs' --target=minor
# This will ensure the current lockfile is up-to-date with the dependency specifications (necessary for "yarn upgrade" to run)
- name: Run "yarn install"
run: yarn install --prefer-offline
Expand Down
1 change: 0 additions & 1 deletion packages/@cdktf/cli-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"ink-use-stdout-dimensions": "1.0.5",
"jsii": "5.3.29",
"jsii-pacmak": "1.95.0",
"jsii-srcmak": "0.1.1039",
"lodash.isequal": "4.5.0",
"log4js": "6.9.1",
"minimatch": "5.1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fs from "fs-extra";
import * as path from "path";
import { CodeMaker } from "codemaker";
import { mkdtemp } from "@cdktf/commons";
import * as srcmak from "jsii-srcmak";
import * as jsii from "./jsii";
import {
TerraformDependencyConstraint,
logger,
Expand All @@ -24,7 +24,7 @@ import { readSchema } from "@cdktf/provider-schema";

export async function generateJsiiLanguage(
code: CodeMaker,
opts: srcmak.Options,
opts: jsii.Options,
outputPath: string,
disallowedFileGlobs: string[] = []
) {
Expand All @@ -43,7 +43,7 @@ export async function generateJsiiLanguage(
filesToDelete.map((file) => fs.remove(path.join(staging, file)))
);

await srcmak.srcmak(staging, opts);
await jsii.run(staging, opts);
["versions.json", "constraints.json"].forEach((file) => {
try {
fs.copySync(
Expand Down Expand Up @@ -381,7 +381,7 @@ export class ConstructsMaker {
private async generateJsiiLanguage(target: ConstructsMakerTarget) {
// these are the module dependencies we compile against
const deps = ["@types/node", "constructs", "cdktf"];
const opts: srcmak.Options = {
const opts: jsii.Options = {
entrypoint: target.fileName,
deps: deps.map((dep) =>
path.dirname(require.resolve(`${dep}/package.json`))
Expand Down

0 comments on commit dd550a1

Please sign in to comment.