-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(core): update @angular-devkit/* deps to fix browserslist out of…
… date issue see angular/angular-cli#16560
- Loading branch information
Showing
15 changed files
with
648 additions
and
239 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
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
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
56 changes: 56 additions & 0 deletions
56
packages/workspace/src/migrations/update-8-12-0/update-package-json-deps.spec.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { Tree } from '@angular-devkit/schematics'; | ||
import { readJsonInTree } from '../../utils/ast-utils'; | ||
import { serializeJson } from '../../utils/fileutils'; | ||
import { runMigration } from '../../utils/testing'; | ||
import { createEmptyWorkspace } from '../../utils/testing-utils'; | ||
|
||
describe('Update 8.12.0: package.json deps', () => { | ||
let tree: Tree; | ||
|
||
beforeEach(async () => { | ||
tree = Tree.empty(); | ||
tree = createEmptyWorkspace(tree); | ||
}); | ||
|
||
describe('Update angular devkit deps', () => { | ||
it('should update the Angular devkit core packages', async () => { | ||
tree.overwrite( | ||
'package.json', | ||
serializeJson({ | ||
devDependencies: { | ||
'@angular-devkit/architect': '0.803.14', | ||
'@angular-devkit/build-angular': '0.803.14', | ||
'@angular-devkit/build-ng-packagr': '0.803.14', | ||
'@angular-devkit/build-optimizer': '0.803.14', | ||
'@angular-devkit/build-webpack': '0.803.14', | ||
'@angular-devkit/schematics': '8.3.14', | ||
'@angular/cli': '8.3.14' | ||
} | ||
}) | ||
); | ||
|
||
const result = await runMigration('update-package-json-deps', {}, tree); | ||
|
||
const packageJson = readJsonInTree(result, 'package.json'); | ||
expect(packageJson.devDependencies['@angular-devkit/architect']).toEqual( | ||
'0.803.22' | ||
); | ||
expect( | ||
packageJson.devDependencies['@angular-devkit/build-angular'] | ||
).toEqual('0.803.22'); | ||
expect( | ||
packageJson.devDependencies['@angular-devkit/build-ng-packagr'] | ||
).toEqual('0.803.22'); | ||
expect( | ||
packageJson.devDependencies['@angular-devkit/build-optimizer'] | ||
).toEqual('0.803.22'); | ||
expect( | ||
packageJson.devDependencies['@angular-devkit/build-webpack'] | ||
).toEqual('0.803.22'); | ||
expect(packageJson.devDependencies['@angular-devkit/schematics']).toEqual( | ||
'8.3.22' | ||
); | ||
expect(packageJson.devDependencies['@angular/cli']).toEqual('8.3.22'); | ||
}); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
packages/workspace/src/migrations/update-8-12-0/update-package-json-deps.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { chain, Rule, SchematicContext } from '@angular-devkit/schematics'; | ||
import { formatFiles } from '@nrwl/workspace/src/utils/rules/format-files'; | ||
import * as path from 'path'; | ||
import { updatePackagesInPackageJson } from '../../utils/update-packages-in-package-json'; | ||
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks'; | ||
|
||
const addInstall = (_: any, context: SchematicContext) => { | ||
context.addTask(new NodePackageInstallTask()); | ||
}; | ||
|
||
export default function(): Rule { | ||
return chain([ | ||
updatePackagesInPackageJson( | ||
path.join(__dirname, '../../..', 'migrations.json'), | ||
'8120' | ||
), | ||
addInstall, | ||
formatFiles() | ||
]); | ||
} |
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
Oops, something went wrong.