From 826befa22d541c6a66e3bc4bf65249e796041357 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Tue, 16 May 2023 09:19:02 -0400 Subject: [PATCH] fix(web): undo core-js removal (#17048) --- packages/web/migrations.json | 6 ----- .../update-16-2-0-remove-packages.spec.ts | 27 ------------------- .../update-16-2-0-remove-packages.ts | 15 ----------- 3 files changed, 48 deletions(-) delete mode 100644 packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.spec.ts delete mode 100644 packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.ts diff --git a/packages/web/migrations.json b/packages/web/migrations.json index 0ced1148867fb..84c2150e77d84 100644 --- a/packages/web/migrations.json +++ b/packages/web/migrations.json @@ -71,12 +71,6 @@ "version": "16.0.0-beta.4", "description": "Replace @nrwl/web executors with @nx/webpack and @nx/rollup", "implementation": "./src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors" - }, - "update-16-2-0-remove-packages": { - "cli": "nx", - "version": "16.2.0-beta.0", - "description": "Remove core-js and regenerator-runtime packages", - "implementation": "./src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages" } }, "packageJsonUpdates": { diff --git a/packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.spec.ts b/packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.spec.ts deleted file mode 100644 index cd410b3668ce4..0000000000000 --- a/packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Tree, readJson, updateJson } from '@nx/devkit'; -import { createTreeWithEmptyWorkspace } from 'nx/src/devkit-testing-exports'; -import removePackages from './update-16-2-0-remove-packages'; - -describe('update-16-2-0-remove-packages', () => { - let tree: Tree; - beforeEach(() => { - tree = createTreeWithEmptyWorkspace(); - - updateJson(tree, 'package.json', (json) => { - json.dependencies['core-js'] = '3.6.5'; - json.dependencies['regenerator-runtime'] = '0.13.7'; - return json; - }); - }); - - it('should remove core-js & regenerator-runtime packages', async () => { - await removePackages(tree); - - expect( - readJson(tree, 'package.json').dependencies['core-js'] - ).not.toBeDefined(); - expect( - readJson(tree, 'package.json').dependencies['regenerator-runtime'] - ).not.toBeDefined(); - }); -}); diff --git a/packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.ts b/packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.ts deleted file mode 100644 index ae9653465ca1f..0000000000000 --- a/packages/web/src/migrations/update-16-2-0-remove-packages/update-16-2-0-remove-packages.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - Tree, - formatFiles, - removeDependenciesFromPackageJson, -} from '@nx/devkit'; - -export default async function removePackages(tree: Tree): Promise { - removeDependenciesFromPackageJson( - tree, - ['core-js', 'regenerator-runtime'], - [] - ); - - await formatFiles(tree); -}