{ "manifestVersion": 3, "env": { "PATH": "$(yarn exec node --print process.env.PATH)" }, "tasks": { "build": { "name": "build", "description": "Full release build", "steps": [ { "spawn": "default" }, { "spawn": "pre-compile" }, { "spawn": "compile" }, { "spawn": "post-compile" }, { "spawn": "test" }, { "spawn": "package" } ] }, "bump": { "name": "bump", "description": "Bumps version based on latest git tag and generates a changelog entry", "env": { "OUTFILE": "package.json", "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", "RELEASE_TAG_PREFIX": "", "BUMP_PACKAGE": "commit-and-tag-version@^13" }, "steps": [ { "builtin": "release/resolve-latest-tag", "outputEnv": "LATEST_TAG" }, { "spawn": "bump:releasable-commits", "outputEnv": "RELEASABLE_COMMITS", "condition": "git rev-parse --verify --quiet \"refs/tags/$LATEST_TAG\"" }, { "builtin": "release/suggest-version-bump", "outputEnv": "SUGGESTED_BUMP" }, { "builtin": "release/apply-version-bump" } ], "condition": "git log --oneline -1 | grep -v \"chore(release):\" > /dev/null" }, "bump:releasable-commits": { "name": "bump:releasable-commits", "description": "Print the releasable commits since the latest release", "steps": [ { "exec": "git log --no-merges --oneline $LATEST_TAG..HEAD -E --grep '^(feat|fix){1}(\\([^()[:space:]]+\\))?(!)?:[[:blank:]]+.+'" } ] }, "clobber": { "name": "clobber", "description": "hard resets to HEAD of origin and cleans the local repo", "env": { "BRANCH": "$(git branch --show-current)", "HEAD_COMMIT": "$(git rev-parse --short HEAD)" }, "steps": [ { "exec": "git checkout -B \"scratch-$HEAD_COMMIT\"", "name": "save current HEAD in a \"scratch-\" branch" }, { "exec": "git checkout \"$BRANCH\"" }, { "execArgs": [ "git", "fetch", "origin" ], "name": "fetch latest changes from origin" }, { "exec": "git reset --hard \"origin/$BRANCH\"", "name": "hard reset to origin commit" }, { "execArgs": [ "git", "clean", "-fdx" ], "name": "clean all untracked files" }, { "say": "ready to rock! (unpushed commits are under a \"scratch-\" branch)" } ], "condition": "git diff --exit-code > /dev/null" }, "compile": { "name": "compile", "description": "Only compile", "steps": [ { "execArgs": [ "tsc", "--build" ] } ] }, "default": { "name": "default", "description": "Synthesize project files", "steps": [ { "execArgs": [ "tsc", "--noEmit", "-p", "projenrc/tsconfig.json" ], "name": "typecheck" }, { "execArgs": [ "tsx", "--tsconfig", "projenrc/tsconfig.json", ".projenrc.ts" ] } ] }, "eject": { "name": "eject", "description": "Remove projen from the project", "env": { "PROJEN_EJECTING": "true" }, "steps": [ { "spawn": "default" } ] }, "eslint": { "name": "eslint", "description": "Runs eslint against the codebase", "env": { "ESLINT_USE_FLAT_CONFIG": "false", "NODE_NO_WARNINGS": "1" }, "steps": [ { "execArgs": [ "eslint", "--ext", ".ts,.tsx", "--fix", "--no-error-on-unmatched-pattern", "$@", "src", "test", "build-tools", "projenrc", ".projenrc.ts" ], "receiveArgs": true } ] }, "install": { "name": "install", "description": "Install project dependencies and update lockfile (non-frozen)", "steps": [ { "exec": "yarn install --no-immutable" } ] }, "install:ci": { "name": "install:ci", "description": "Install project dependencies using frozen lockfile", "steps": [ { "exec": "yarn install --immutable" } ] }, "package": { "name": "package", "description": "Creates the distribution package", "steps": [ { "execArgs": [ "mkdir", "-p", "dist/js" ] }, { "execArgs": [ "npm", "pack", "--pack-destination", "dist/js" ] } ] }, "post-compile": { "name": "post-compile", "description": "Runs after successful compilation" }, "post-upgrade": { "name": "post-upgrade", "description": "Runs after upgrading dependencies" }, "pre-compile": { "name": "pre-compile", "description": "Prepare the project for compilation" }, "release": { "name": "release", "description": "Prepare a release from \"main\" branch", "env": { "RELEASE": "true", "MAJOR": "1" }, "steps": [ { "execArgs": [ "rm", "-fr", "dist" ] }, { "spawn": "bump" }, { "spawn": "build" }, { "spawn": "unbump" }, { "exec": "git diff --ignore-space-at-eol --exit-code" } ], "condition": "git log --oneline -1 | grep -v \"chore(release):\" > /dev/null" }, "test": { "name": "test", "description": "Run tests", "steps": [ { "spawn": "compile" }, { "execArgs": [ "jest", "--passWithNoTests", "--updateSnapshot" ], "receiveArgs": true }, { "spawn": "eslint" } ] }, "test:watch": { "name": "test:watch", "description": "Run jest in watch mode", "steps": [ { "execArgs": [ "jest", "--watch" ] } ] }, "unbump": { "name": "unbump", "description": "Restores version to 0.0.0", "env": { "OUTFILE": "package.json", "CHANGELOG": "dist/changelog.md", "BUMPFILE": "dist/version.txt", "RELEASETAG": "dist/releasetag.txt", "RELEASE_TAG_PREFIX": "", "BUMP_PACKAGE": "commit-and-tag-version@^13" }, "steps": [ { "builtin": "release/reset-version" } ] }, "upgrade": { "name": "upgrade", "description": "upgrade dependencies", "env": { "CI": "0", "YARN_ENABLE_IMMUTABLE_INSTALLS": "false", "YARN_NPM_MINIMAL_AGE_GATE": "4320" }, "steps": [ { "execArgs": [ "yarn", "dlx", "npm-check-updates@20", "--upgrade", "--target=minor", "--cooldown=3", "--peer", "--no-deprecated", "--dep=prod", "--filter=esbuild,fs-extra,madge,shlex,yargs" ] }, { "exec": "yarn install --no-immutable" }, { "execArgs": [ "yarn", "up", "-R", "esbuild", "fs-extra", "license-checker-rseidelsohn", "madge", "shlex", "yargs" ] }, { "exec": "yarn projen" }, { "spawn": "post-upgrade" } ] }, "upgrade-cdklabs-projen-project-types": { "name": "upgrade-cdklabs-projen-project-types", "description": "upgrade cdklabs-projen-project-types", "env": { "CI": "0", "YARN_ENABLE_IMMUTABLE_INSTALLS": "false" }, "steps": [ { "execArgs": [ "yarn", "dlx", "npm-check-updates@20", "--upgrade", "--target=latest", "--peer", "--no-deprecated", "--dep=dev,prod,peer,optional", "--filter=cdklabs-projen-project-types,projen" ] }, { "exec": "yarn install --no-immutable" }, { "execArgs": [ "yarn", "up", "-R", "cdklabs-projen-project-types", "projen" ] }, { "exec": "yarn projen" }, { "spawn": "post-upgrade" } ] }, "upgrade-dev-deps": { "name": "upgrade-dev-deps", "description": "upgrade dev dependencies", "env": { "CI": "0", "YARN_ENABLE_IMMUTABLE_INSTALLS": "false", "YARN_NPM_MINIMAL_AGE_GATE": "4320" }, "steps": [ { "execArgs": [ "yarn", "dlx", "npm-check-updates@20", "--upgrade", "--target=minor", "--cooldown=3", "--peer", "--no-deprecated", "--dep=dev", "--filter=@types/fs-extra,@types/jest,@types/madge,eslint-import-resolver-typescript,eslint-plugin-import,jest,ts-jest,tsx,typescript" ] }, { "exec": "yarn install --no-immutable" }, { "execArgs": [ "yarn", "up", "-R", "@stylistic/eslint-plugin", "@types/fs-extra", "@types/jest", "@types/madge", "@types/node", "@typescript-eslint/eslint-plugin", "@typescript-eslint/parser", "commit-and-tag-version", "constructs", "eslint-import-resolver-typescript", "eslint-plugin-import", "eslint", "jest", "jest-junit", "ts-jest", "tsx", "typescript" ] }, { "exec": "yarn projen" }, { "spawn": "post-upgrade" } ] }, "watch": { "name": "watch", "description": "Watch & compile in the background", "steps": [ { "execArgs": [ "tsc", "--build", "-w" ] } ] } }, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"yarn projen\"." }