-
Notifications
You must be signed in to change notification settings - Fork 822
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(amplify-cli-core): use build script properly for overrides (#14093)
* fix(amplify-cli-core): use build script properly for overrides Updated the TypeScript compilation of overrides so that it doesn't require `node_modules/.bin/tsc`. Instead, it simply relies on the `build` script to execute `tsc`. This is more flexible and can support alternative setups w/ hoisting (e.g. via Yarn workspaces). This is an override corollary fix to #11854, which is for custom resources. This is an improvement over my previous PR in #13858 in that it works with any package manager by ensuring the `--project` and `tsconfig.json` files are passed through to the `tsc` script. The previous implementation didn't work with `npm` because it doesn't pass through additional args like `yarn` does. The fix was easy: simply separate the build run with `--` so that the remaining args are treated as positional for the `tsc` script. I've confirmed the fix works with both `yarn` and `npm` 💪 #11889 * fix(amplify-cli-core): only include -- for npm Tweaked the implementation slightly so that the `--` arg is only passed for `npm` since it doesn't actually work with `yarn`. #11889 * fix(amplify-cli-core): new packageManner runner Added a new `runner` field to the PackageManager interface. The key difference here is npm's runner is actually `npx`, whereas yarn and pnpm just use the same executable as the runner. Updated both the override and custom-resources to use the runner to run tsc now instead of only looking in `node_modules`. #11889 * fix: update api --------- Co-authored-by: Kamil Sobol <[email protected]>
- Loading branch information
Showing
4 changed files
with
10 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters