mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-11 22:49:54 +00:00
* Adjust `package.json`s to pnpm * Convert resolutions (pnpm doesn't support `**/` syntax) It also removes resolutions that are no longer relevant. * Convert `yarn.lock` to `pnpm-lock.yaml` with `pnpm import` * Always add `e/web/teleport` workspace to the lockfile * Adjust `jest` to new node_modules structure * Adjust `storybook` to new node_modules structure * Replace `toHaveStyleRule` with `toHaveStyle` `jest-styled-components` package is no longer global, so `toHaveStyleRule` matchers is not recognized by TS. We use them only in three places, so it's simpler to convert them to `toHaveStyle`. * Adjust README files * Adjust GHA workflows * Adjust build assets * Remove remaining `yarn` mentions I don't think anyone uses the debug configuration for electron (and we don't have `start-electron` script for a long time). * `corepack enable` -> `corepack enable pnpm` * Automatically enable pnpm when running `make build/teleport` * Run `pnpm import` again * Run `pnpm dedupe` * Add `yarn.lock` to .gitignore * Link to pnpm installation docs * Add a better comment for `transformIgnorePatterns` * Make pattern for `shared` stories more specific * Change `corepack enable pnpm` in readmes * Run `pnpm import && pnpm dedupe` again
20 lines
646 B
JavaScript
20 lines
646 B
JavaScript
function afterAllResolved(lockfile, context) {
|
|
// The pnpm lockfile contains entries for all workspaces.
|
|
// This means that if the `e` repo is not cloned, we will get a different
|
|
// lockfile.
|
|
// The ugly workaround is to add an entry for e/web/teleport workspace manually.
|
|
// We pass an empty object because `e/web/teleport` package.json doesn't have
|
|
// any dependencies.
|
|
if (!lockfile.importers['e/web/teleport']) {
|
|
context.log(`Workspace 'e/web/teleport' is not present, patching lockfile.`);
|
|
lockfile.importers['e/web/teleport'] = {};
|
|
}
|
|
return lockfile;
|
|
}
|
|
|
|
module.exports = {
|
|
hooks: {
|
|
afterAllResolved,
|
|
},
|
|
};
|