Skip to content

Commit

Permalink
feat(store): upgrade to angular 7 (ngxs#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored and Danny Blue committed Oct 22, 2018
1 parent 0624cd9 commit e2ed74a
Show file tree
Hide file tree
Showing 34 changed files with 1,232 additions and 1,109 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/out-tsc
/src/environments/version.ts
/builds
/@ngxs

# dependencies
**/node_modules
Expand Down
2 changes: 1 addition & 1 deletion integration/tsconfig.app.integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@ngxs/*": ["../builds/*"]
"@ngxs/*": ["../@ngxs/*"]
},
"outDir": "./out-tsc/app",
"module": "es2015",
Expand Down
2 changes: 1 addition & 1 deletion integration/tsconfig.spec.integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@ngxs/*": ["../builds/*"]
"@ngxs/*": ["../@ngxs/*"]
},
"outDir": "./out-tsc/spec",
"module": "commonjs",
Expand Down
34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,18 @@
},
"private": true,
"devDependencies": {
"@angular/cli": "6.0.8",
"@angular/common": "6.0.5",
"@angular/compiler": "6.0.5",
"@angular/compiler-cli": "6.0.5",
"@angular/core": "6.0.5",
"@angular/forms": "6.0.5",
"@angular/http": "6.0.5",
"@angular/language-service": "6.0.5",
"@angular/platform-browser": "6.0.5",
"@angular/platform-browser-dynamic": "6.0.5",
"@angular/router": "6.0.5",
"@angular-devkit/build-angular": "~0.10.2",
"@angular/cli": "7.0.2",
"@angular/common": "7.0.0",
"@angular/compiler": "7.0.0",
"@angular/compiler-cli": "7.0.0",
"@angular/core": "7.0.0",
"@angular/forms": "7.0.0",
"@angular/http": "7.0.0",
"@angular/language-service": "7.0.0",
"@angular/platform-browser": "7.0.0",
"@angular/platform-browser-dynamic": "7.0.0",
"@angular/router": "7.0.0",
"@commitlint/cli": "^6.1.3",
"@commitlint/config-conventional": "^6.1.3",
"@types/deep-freeze-strict": "^1.1.0",
Expand All @@ -109,18 +110,17 @@
"karma-jasmine-html-reporter": "^0.2.2",
"lint-staged": "^7.0.0",
"mock-socket": "^7.1.0",
"ng-packagr": "3.0.0-rc.1",
"ng-packagr": "^4.3.1",
"npm-run-all": "^4.1.2",
"prettier": "^1.8.2",
"rxjs": "^6.0.0",
"ts-node": "~5.0.1",
"tsickle": "^0.27.2",
"tsickle": "^0.33.0",
"tslib": "^1.9.0",
"tslint": "^5.8.0",
"typedoc": "^0.11.1",
"typedoc-plugin-markdown": "^1.1.1",
"typescript": "2.7.2",
"npm-run-all": "^4.1.2",
"zone.js": "^0.8.26",
"@angular-devkit/build-angular": "~0.6.8"
"typescript": "^3.1.0",
"zone.js": "^0.8.26"
}
}
6 changes: 4 additions & 2 deletions packages/devtools-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export { NgxsReduxDevtoolsPluginModule } from './src/devtools.module';
export { NgxsReduxDevtoolsPlugin } from './src/devtools.plugin';
/**
* The public api for consumers of @ngxs/devtools-plugin
*/
export * from './src/public_api';
11 changes: 0 additions & 11 deletions packages/devtools-plugin/ng-package.json

This file was deleted.

11 changes: 11 additions & 0 deletions packages/devtools-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "./node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/devtools-plugin",
"description": "redux devtools plugin for @ngxs/store",
"version": "0.0.0",
Expand All @@ -7,5 +8,15 @@
"@ngxs/store": "^0.0.0",
"@angular/core": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-devtools-plugin",
"entryFile": "index.ts",
"umdModuleIds": {
"@ngxs/store": "ngxs-store"
}
},
"dest": "../../@ngxs/devtools-plugin"
}
}
3 changes: 3 additions & 0 deletions packages/devtools-plugin/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { NgxsReduxDevtoolsPluginModule } from './devtools.module';
export { NgxsReduxDevtoolsPlugin } from './devtools.plugin';
export * from './symbols';
7 changes: 4 additions & 3 deletions packages/form-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { NgxsFormPluginModule } from './src/form.module';
export { NgxsFormPlugin } from './src/form.plugin';
export * from './src/actions';
/**
* The public api for consumers of @ngxs/form-plugin
*/
export * from './src/public_api';
11 changes: 11 additions & 0 deletions packages/form-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/form-plugin",
"description": "form plugin for @ngxs/store",
"version": "0.0.0",
Expand All @@ -8,5 +9,15 @@
"@angular/core": ">=5.0.0 <8.0.0",
"@angular/forms": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-form-plugin",
"entryFile": "index.ts",
"umdModuleIds": {
"@ngxs/store": "ngxs-store"
}
},
"dest": "../../@ngxs/form-plugin"
}
}
3 changes: 3 additions & 0 deletions packages/form-plugin/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { NgxsFormPluginModule } from './form.module';
export { NgxsFormPlugin } from './form.plugin';
export * from './actions';
6 changes: 4 additions & 2 deletions packages/logger-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
export { NgxsLoggerPluginModule } from './src/logger.module';
export { NgxsLoggerPlugin } from './src/logger.plugin';
/**
* The public api for consumers of @ngxs/logger-plugin
*/
export * from './src/public_api';
11 changes: 0 additions & 11 deletions packages/logger-plugin/ng-package.json

This file was deleted.

11 changes: 11 additions & 0 deletions packages/logger-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/logger-plugin",
"description": "logger plugin for @ngxs/store",
"version": "0.0.0",
Expand All @@ -7,5 +8,15 @@
"@ngxs/store": "^0.0.0",
"@angular/core": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-logger-plugin",
"entryFile": "index.ts",
"umdModuleIds": {
"@ngxs/store": "ngxs-store"
}
},
"dest": "../../@ngxs/logger-plugin"
}
}
3 changes: 3 additions & 0 deletions packages/logger-plugin/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { NgxsLoggerPluginModule } from './logger.module';
export { NgxsLoggerPlugin } from './logger.plugin';
export * from './symbols';
8 changes: 4 additions & 4 deletions packages/router-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { NgxsRouterPluginModule } from './src/router.module';
export { RouterState, RouterStateModel } from './src/router.state';
export { RouterStateSerializer, DefaultRouterStateSerializer, SerializedRouterStateSnapshot } from './src/serializer';
export * from './src/router.actions';
/**
* The public api for consumers of @ngxs/router-plugin
*/
export * from './src/public_api';
11 changes: 0 additions & 11 deletions packages/router-plugin/ng-package.json

This file was deleted.

11 changes: 11 additions & 0 deletions packages/router-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/router-plugin",
"description": "router plugin for @ngxs/store",
"version": "0.0.0",
Expand All @@ -8,5 +9,15 @@
"@angular/core": ">=5.0.0 <8.0.0",
"@angular/router": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-router-plugin",
"entryFile": "index.ts",
"umdModuleIds": {
"@ngxs/store": "ngxs-store"
}
},
"dest": "../../@ngxs/router-plugin"
}
}
4 changes: 4 additions & 0 deletions packages/router-plugin/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { NgxsRouterPluginModule } from './router.module';
export { RouterState, RouterStateModel } from './router.state';
export { RouterStateSerializer, DefaultRouterStateSerializer, SerializedRouterStateSnapshot } from './serializer';
export * from './router.actions';
10 changes: 5 additions & 5 deletions packages/router-plugin/src/router.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { NgxsModule } from '@ngxs/store';
import { DefaultRouterStateSerializer, RouterStateSerializer } from './serializer';
import { RouterState } from './router.state';

// NOTE: Must mark as `dynamic` due to
// https://github.com/dherges/ng-packagr/issues/767
export const NgxsModuleRouterState = NgxsModule.forFeature([RouterState]);

// @dynamic
@NgModule({
imports: [
// NOTE: Must mark as `dynamic` due to
// https://github.com/dherges/ng-packagr/issues/767
NgxsModule.forFeature([RouterState])
],
imports: [NgxsModuleRouterState],
providers: [{ provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }]
})
export class NgxsRouterPluginModule {
Expand Down
7 changes: 4 additions & 3 deletions packages/storage-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { NgxsStoragePluginModule } from './src/storage.module';
export { NgxsStoragePlugin } from './src/storage.plugin';
export * from './src/symbols';
/**
* The public api for consumers of @ngxs/storage-plugin
*/
export * from './src/public_api';
11 changes: 11 additions & 0 deletions packages/storage-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/storage-plugin",
"description": "extendable storage plugin for @ngxs/store",
"version": "0.0.0",
Expand All @@ -7,5 +8,15 @@
"@ngxs/store": "^0.0.0",
"@angular/core": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-storage-plugin",
"entryFile": "index.ts",
"umdModuleIds": {
"@ngxs/store": "ngxs-store"
}
},
"dest": "../../@ngxs/storage-plugin"
}
}
3 changes: 3 additions & 0 deletions packages/storage-plugin/src/public_api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export { NgxsStoragePluginModule } from './storage.module';
export { NgxsStoragePlugin } from './storage.plugin';
export * from './symbols';
1 change: 0 additions & 1 deletion packages/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* The public api for consumers of @ngxs/store
*/

export * from './src/public_api';

/**
Expand Down
9 changes: 0 additions & 9 deletions packages/store/ng-package.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/store/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{
"$schema": "./node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/store",
"version": "0.0.0",
"license": "MIT",
"sideEffects": true,
"peerDependencies": {
"@angular/core": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-store",
"entryFile": "index.ts",
"umdModuleIds": {}
},
"dest": "../../@ngxs/store"
}
}
14 changes: 13 additions & 1 deletion packages/store/src/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ export { Store } from './store';
export { State } from './decorators/state';
export { Select } from './decorators/select';
export { Actions } from './actions-stream';
export { ofAction, ofActionDispatched, ofActionSuccessful, ofActionCanceled, ofActionErrored } from './operators/of-action';
export {
getSelectorMetadata,
getStoreMetadata,
ensureStoreMetadata,
ensureSelectorMetadata
} from './internal/internals';
export {
ofAction,
ofActionDispatched,
ofActionSuccessful,
ofActionCanceled,
ofActionErrored
} from './operators/of-action';
export { NgxsPlugin, NgxsPluginFn, StateContext, NgxsOnInit } from './symbols';
export { Selector } from './decorators/selector';
export { getActionTypeFromInstance, actionMatcher } from './utils/utils';
Expand Down
13 changes: 4 additions & 9 deletions packages/websocket-plugin/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
export { NgxsWebsocketPluginModule } from './src/websocket.module';
export {
NgxsWebsocketPluginOptions,
NGXS_WEBSOCKET_OPTIONS,
ConnectWebSocket,
DisconnectWebSocket,
SendWebSocketMessage,
WebsocketMessageError
} from './src/symbols';
/**
* The public api for consumers of @ngxs/websocket-plugin
*/
export * from './src/public_api';
11 changes: 11 additions & 0 deletions packages/websocket-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/ng-packagr/package.schema.json",
"name": "@ngxs/websocket-plugin",
"description": "Websocket plugin for @ngxs/store",
"version": "0.0.0",
Expand All @@ -7,5 +8,15 @@
"@ngxs/store": "^0.0.0",
"@angular/core": ">=5.0.0 <8.0.0",
"rxjs": ">=6.0.0 || ^5.6.0-forward-compat.4"
},
"ngPackage": {
"lib": {
"flatModuleFile": "ngxs-websocket-plugin",
"entryFile": "index.ts",
"umdModuleIds": {
"@ngxs/store": "ngxs-store"
}
},
"dest": "../../@ngxs/websocket-plugin"
}
}
Loading

0 comments on commit e2ed74a

Please sign in to comment.