Skip to content

Commit 00e6613

Browse files
sqlProvidersqlProvider
authored andcommitted
[Version] v2.0.1
1 parent 66b3a99 commit 00e6613

File tree

5 files changed

+59
-43
lines changed

5 files changed

+59
-43
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## v2.0.1
2+
- $pub command return undefined when no event subscribe.
3+
- $sub method bug solved. RxJS Subscriber no longer call subscribe method on start.
4+
15
## v2.0.0
26
- PubSubService moved into PubSubModule.
37
- Added unit tests for the service and project restructure updated to use the benefits of webpack and bundling.

README.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ export class NavigationComponent implements OnInit, OnDestroy {
8080
ngOnInit() {
8181
// usage of $sub(event: string): <Observable<any>>;
8282
this.closeSidenavSub = this.pubsub.$sub('pleaseCloseSidenav').subscribe((from) => {
83-
from ? this.sidenavOpened = false : void 0
83+
this.sidenavOpened = false;
8484
});
8585

8686
// usage of $sub(event: string, callback: (value: any) => void, error?: (error: any) => void, complete?: () => void): Subscription;
8787
this.openSidenavSub = this.pubsub.$sub('pleaseOpenSidenav', (from) => {
88-
from ? this.sidenavOpened = false : void 0
88+
this.sidenavOpened = true;
8989
});
9090
}
9191
ngOnDestroy() {
@@ -94,15 +94,7 @@ export class NavigationComponent implements OnInit, OnDestroy {
9494
}
9595
```
9696
97-
$sub method have one bug. RxJS Subscriber call subscribe method on start like Angular 1.x $scope.$watch.
98-
99-
```typescript
100-
this.closeSidenavSub = this.pubsub.$sub('pleaseCloseSidenav').subscribe((from) => {
101-
console.log(form);
102-
});
103-
104-
// => 0
105-
```
97+
**See Changelog** ~~$sub method have one bug. RxJS Subscriber call subscribe method on start like Angular 1.x $scope.$watch.~~
10698
10799
## Build the source
108100
@@ -112,9 +104,4 @@ npm install
112104
npm test
113105
npm run build
114106
```
115-
Commands above will generate the ready to use bundles under the `./dist` folder.
116-
117-
## Contributers
118-
119-
- [Semih KEŞKEK](http://github.com/sqlProvider)
120-
- [Mert SUSUR](http://github.com/msusur)
107+
Commands above will generate the ready to use bundles under the `./dist` folder.

bower.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

npm-debug.log

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
0 info it worked if it ends with ok
2+
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'publish' ]
3+
2 info using npm@3.10.9
4+
3 info using node@v6.9.2
5+
4 verbose run-script [ 'prepublish', 'publish', 'postpublish' ]
6+
5 info lifecycle angular2-pubsub@2.0.1~prepublish: angular2-pubsub@2.0.1
7+
6 silly lifecycle angular2-pubsub@2.0.1~prepublish: no script for prepublish, continuing
8+
7 info lifecycle angular2-pubsub@2.0.1~publish: angular2-pubsub@2.0.1
9+
8 verbose lifecycle angular2-pubsub@2.0.1~publish: unsafe-perm in lifecycle true
10+
9 verbose lifecycle angular2-pubsub@2.0.1~publish: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Volumes/Project/github/sqlprovider/angular2-pubsub/node_modules/.bin:/Users/sqlprovider/Library/Android/sdk/platform-tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/sqlprovider/Library/Android/sdk/platform-tools
11+
10 verbose lifecycle angular2-pubsub@2.0.1~publish: CWD: /Volumes/Project/github/sqlprovider/angular2-pubsub
12+
11 silly lifecycle angular2-pubsub@2.0.1~publish: Args: [ '-c', 'npm run build && ./publish.sh' ]
13+
12 silly lifecycle angular2-pubsub@2.0.1~publish: Returned: code: 1 signal: null
14+
13 info lifecycle angular2-pubsub@2.0.1~publish: Failed to exec publish script
15+
14 verbose stack Error: angular2-pubsub@2.0.1 publish: `npm run build && ./publish.sh`
16+
14 verbose stack Exit status 1
17+
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
18+
14 verbose stack at emitTwo (events.js:106:13)
19+
14 verbose stack at EventEmitter.emit (events.js:191:7)
20+
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
21+
14 verbose stack at emitTwo (events.js:106:13)
22+
14 verbose stack at ChildProcess.emit (events.js:191:7)
23+
14 verbose stack at maybeClose (internal/child_process.js:877:16)
24+
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
25+
15 verbose pkgid angular2-pubsub@2.0.1
26+
16 verbose cwd /Volumes/Project/github/sqlprovider/angular2-pubsub
27+
17 error Darwin 16.4.0
28+
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "publish"
29+
19 error node v6.9.2
30+
20 error npm v3.10.9
31+
21 error code ELIFECYCLE
32+
22 error angular2-pubsub@2.0.1 publish: `npm run build && ./publish.sh`
33+
22 error Exit status 1
34+
23 error Failed at the angular2-pubsub@2.0.1 publish script 'npm run build && ./publish.sh'.
35+
23 error Make sure you have the latest version of node.js and npm installed.
36+
23 error If you do, this is most likely a problem with the angular2-pubsub package,
37+
23 error not with npm itself.
38+
23 error Tell the author that this fails on your system:
39+
23 error npm run build && ./publish.sh
40+
23 error You can get information on how to open an issue for this project with:
41+
23 error npm bugs angular2-pubsub
42+
23 error Or if that isn't available, you can get their info via:
43+
23 error npm owner ls angular2-pubsub
44+
23 error There is likely additional logging output above.
45+
24 verbose exit [ 1, true ]

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-pubsub",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Pub/Sub service for Angular 2",
55
"main": "./umd/angular2-pubsub.js",
66
"module": "./esm/src/index.js",
@@ -14,7 +14,7 @@
1414
"clean": "rm -rf dist",
1515
"build-umd": "webpack --config webpack.config.umd.js",
1616
"build-angular": "ngc -p tsconfig-ngc.json",
17-
"copy-package-info": "cp ./package.json ./dist/package.json && cp ./bower.json ./dist/bower.json && cp ./.npmignore ./dist/.npmignore",
17+
"copy-package-info": "cp ./package.json ./dist/package.json && cp ./.npmignore ./dist/.npmignore",
1818
"build": "npm run clean && npm run build-umd && npm run build-angular && npm run copy-package-info",
1919
"publish": "npm run build && ./publish.sh"
2020
},
@@ -33,6 +33,10 @@
3333
"name": "Mert Susur",
3434
"email": "mail@mertsusur.com",
3535
"url": "http://github.com/msusur"
36+
},
37+
{
38+
"name": "Dustin Cleveland",
39+
"url": "https://github.com/dustincleveland"
3640
}
3741
],
3842
"license": "ISC",

0 commit comments

Comments
 (0)