-
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, browserslist and caniuse-list
- Loading branch information
Showing
15 changed files
with
678 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
80 changes: 80 additions & 0 deletions
80
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,80 @@ | ||
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/core': '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/core']).toEqual( | ||
'8.3.22' | ||
); | ||
expect(packageJson.devDependencies['@angular-devkit/schematics']).toEqual( | ||
'8.3.22' | ||
); | ||
expect(packageJson.devDependencies['@angular/cli']).toEqual('8.3.22'); | ||
}); | ||
|
||
it('should update the browserslist & caniuse', async () => { | ||
tree.overwrite( | ||
'package.json', | ||
serializeJson({ | ||
devDependencies: { | ||
browserslist: '4.6.6', | ||
'caniuse-lite': '1.0.30000989' | ||
} | ||
}) | ||
); | ||
|
||
const result = await runMigration('update-package-json-deps', {}, tree); | ||
|
||
const packageJson = readJsonInTree(result, 'package.json'); | ||
expect(packageJson.devDependencies['browserslist']).toEqual('4.8.3'); | ||
expect(packageJson.devDependencies['caniuse-lite']).toEqual( | ||
'1.0.30001019' | ||
); | ||
}); | ||
}); | ||
}); |
14 changes: 14 additions & 0 deletions
14
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,14 @@ | ||
import { chain, Rule } 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'; | ||
|
||
export default function(): Rule { | ||
return chain([ | ||
updatePackagesInPackageJson( | ||
path.join(__dirname, '../../..', 'migrations.json'), | ||
'8120' | ||
), | ||
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.