Skip to content

Commit 00c00e0

Browse files
timdeschryverbrandonroberts
authored andcommitted
fix(data): update the package name for replacement to ngrx-data (#1805)
Closes #1802
1 parent 63e4926 commit 00c00e0

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

modules/data/schematics/ng-add/index.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,29 +98,29 @@ describe('Data ng-add Schematic', () => {
9898
expect(content).toMatch(/EntityDataModuleWithoutEffects\n/);
9999
});
100100

101-
describe('Migration of angular-ngrx-data', () => {
102-
it('should remove angular-ngrx-data from package.json', () => {
101+
describe('Migration of ngrx-data', () => {
102+
it('should remove ngrx-data from package.json', () => {
103103
const options = { ...defaultOptions, migrateNgrxData: true };
104104

105105
const packageJsonBefore = JSON.parse(
106106
appTree.readContent('/package.json')
107107
);
108-
packageJsonBefore['dependencies']['angular-ngrx-data'] = '1.0.0';
108+
packageJsonBefore['dependencies']['ngrx-data'] = '1.0.0';
109109
appTree.overwrite(
110110
'/package.json',
111111
JSON.stringify(packageJsonBefore, null, 2)
112112
);
113113

114114
expect(
115115
JSON.parse(appTree.readContent('/package.json'))['dependencies'][
116-
'angular-ngrx-data'
116+
'ngrx-data'
117117
]
118118
).toBeDefined();
119119

120120
const tree = schematicRunner.runSchematic('ng-add', options, appTree);
121121
const packageJson = JSON.parse(tree.readContent('/package.json'));
122122

123-
expect(packageJson.dependencies['angular-ngrx-data']).not.toBeDefined();
123+
expect(packageJson.dependencies['ngrx-data']).not.toBeDefined();
124124
});
125125

126126
it('should rename NgrxDataModule', () => {

modules/data/schematics/ng-add/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ function removeAngularNgRxDataFromPackageJson() {
9393
const sourceText = host.read('package.json')!.toString('utf-8');
9494
const json = JSON.parse(sourceText);
9595

96-
if (json['dependencies'] && json['dependencies']['angular-ngrx-data']) {
97-
delete json['dependencies']['angular-ngrx-data'];
96+
if (json['dependencies'] && json['dependencies']['ngrx-data']) {
97+
delete json['dependencies']['ngrx-data'];
9898
}
9999

100100
host.overwrite('package.json', JSON.stringify(json, null, 2));

modules/data/schematics/ng-add/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"migrateNgrxData": {
3838
"type": "boolean",
3939
"default": false,
40-
"description": "Migrate from angular-ngrx-data, will rename modules.",
40+
"description": "Migrate from ngrx-data, will rename modules.",
4141
"alias": "migrate"
4242
}
4343
},

projects/ngrx.io/content/guide/data/install.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ng add @ngrx/data
2929
* project - name of the project defined in your `angular.json` to help locating the module to add the `EntityDataModule` to.
3030
* module - name of file containing the module that you wish to add the import for the `EntityDataModule` to. Can also include the relative path to the file. For example, `src/app/app.module.ts`.
3131
* effects - if `false` it will use the `EntityDataModuleWithoutEffects` module instead of the default `EntityDataModule`.
32-
* migrateNgRxData - if `true` it will replace the `angular-ngrx-data` module with the `@ngrx/data` module.
32+
* migrateNgRxData - if `true` it will replace the `ngrx-data` module with the `@ngrx/data` module.
3333

3434
This command will automate the following steps:
3535

@@ -39,5 +39,5 @@ This command will automate the following steps:
3939

4040
With the `migrateNgRxData` flag the following will also take place:
4141

42-
1. Remove `angular-ngrx-data` from `package.json` > `dependencies`.
43-
2. Rename `angular-ngrx-data` types to the matching `@ngrx/data` types.
42+
1. Remove `ngrx-data` from `package.json` > `dependencies`.
43+
2. Rename `ngrx-data` types to the matching `@ngrx/data` types.

projects/ngrx.io/content/guide/migration/v8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,6 @@ To stay consistent with the other `@ngrx/*` packages, the following has been ren
237237

238238
<div class="alert is-helpful">
239239

240-
The installation of `@ngrx/data` package via `ng add @ngrx/data` will remove `angular-ngrx-data` from the `package.json` and will also perform these renames.
240+
The installation of `@ngrx/data` package via `ng add @ngrx/data` will remove `ngrx-data` from the `package.json` and will also perform these renames.
241241

242242
</div>

0 commit comments

Comments
 (0)