Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c42a0dd

Browse files
chore(release): bump versions. verify package versions.
1 parent ce20cc2 commit c42a0dd

File tree

2 files changed

+37
-10
lines changed

2 files changed

+37
-10
lines changed

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularfire2",
3-
"version": "4.0.0-rc.2-next",
3+
"version": "4.0.0-rc.2",
44
"description": "The official library of Firebase and Angular.",
55
"private": true,
66
"scripts": {

‎tools/build.js‎

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,32 @@ function measure(module, gzip = true) {
198198
return prettySize(bytes, gzip);
199199
}
200200

201+
/**
202+
* Returns each version of each AngularFire module.
203+
* This is used to help ensure each package has the same verison.
204+
*/
205+
function getVersions() {
206+
const paths = [
207+
getDestPackageFile('core'),
208+
getDestPackageFile('auth'),
209+
getDestPackageFile('database')
210+
];
211+
return paths
212+
.map(path => require(path))
213+
.map(pkgs => pkgs.version);
214+
}
215+
216+
function verifyVersions() {
217+
const versions = getVersions();
218+
console.log(versions);
219+
versions.map(version => {
220+
if(version !== pkg.version) {
221+
throw new Error('Versions mistmatch');
222+
process.exit(1);
223+
}
224+
});
225+
}
226+
201227
function buildModule(name, globals) {
202228
const es2015$ = spawnObservable(NGC, TSC_ARGS(name));
203229
const esm$ = spawnObservable(NGC, TSC_ARGS(name, 'esm'));
@@ -219,14 +245,7 @@ function buildModules(globals) {
219245
return Observable
220246
.forkJoin(core$, Observable.from(copyRootTest()))
221247
.switchMapTo(auth$)
222-
.switchMapTo(db$)
223-
.do(() => {
224-
console.log(`
225-
core.umd.js - ${measure('core')}
226-
auth.umd.js - ${measure('auth')}
227-
database.umd.js - ${measure('database')}
228-
`);
229-
});
248+
.switchMapTo(db$);
230249
}
231250

232251
function buildLibrary(globals) {
@@ -235,7 +254,15 @@ function buildLibrary(globals) {
235254
.forkJoin(modules$)
236255
.switchMap(() => Observable.from(createTestUmd(globals)))
237256
.switchMap(() => Observable.from(copyNpmIgnore()))
238-
.switchMap(() => Observable.from(copyReadme()));
257+
.switchMap(() => Observable.from(copyReadme()))
258+
.do(() => {
259+
console.log(`
260+
core.umd.js - ${measure('core')}
261+
auth.umd.js - ${measure('auth')}
262+
database.umd.js - ${measure('database')}
263+
`);
264+
verifyVersions();
265+
});
239266
}
240267

241268
buildLibrary(GLOBALS).subscribe(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /