Skip to content

Commit 368bc4b

Browse files
philipwaltonjeffposnick
authored andcommitted
Publish version (#2292)
* Upgrade lerna * Ensure version strings are updated during publish
1 parent 6ef598c commit 368bc4b

File tree

8 files changed

+756
-481
lines changed

8 files changed

+756
-481
lines changed

gulp-tasks/build-browser-packages.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88

99
const gulp = require('gulp');
1010

11+
const {transpilePackageOrSkip} = require('./transpile-typescript');
1112
const buildBrowserBundle = require('./utils/build-browser-bundle');
1213
const versionModule = require('./utils/version-module');
1314
const constants = require('./utils/constants');
1415
const packageRunnner = require('./utils/package-runner');
1516

17+
1618
gulp.task('build-browser-packages:browser-bundle', gulp.series(
19+
packageRunnner('build-browser-packages:transpile-typescript',
20+
'browser', transpilePackageOrSkip),
1721
Object.keys(constants.BUILD_TYPES).map((buildKey) => packageRunnner(
1822
'build-browser-packages:browser-bundle',
1923
'browser',
@@ -23,12 +27,10 @@ gulp.task('build-browser-packages:browser-bundle', gulp.series(
2327
));
2428

2529
gulp.task('build-browser-packages:version-module', gulp.series(
26-
Object.keys(constants.BUILD_TYPES).map((buildKey) => packageRunnner(
30+
packageRunnner(
2731
'build-browser-packages:version-module',
2832
'browser',
29-
versionModule,
30-
constants.BUILD_TYPES[buildKey],
31-
))
33+
versionModule)
3234
));
3335

3436
gulp.task('build-browser-packages', gulp.series(

gulp-tasks/build-packages.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ gulp.task('build-packages:clean', gulp.series(
4848
));
4949

5050
gulp.task('build-packages:build', gulp.series(
51-
'transpile-typescript',
5251
gulp.parallel(
5352
'build-node-packages',
5453
'build-browser-packages',

gulp-tasks/build-window-packages.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,16 @@
88

99
const gulp = require('gulp');
1010

11+
const {transpilePackageOrSkip} = require('./transpile-typescript');
1112
const buildWindowBundle = require('./utils/build-window-bundle');
1213
const versionModule = require('./utils/version-module');
1314
const constants = require('./utils/constants');
1415
const packageRunnner = require('./utils/package-runner');
1516

17+
1618
gulp.task('build-window-packages:window-bundle', gulp.series(
19+
packageRunnner('build-window-packages:transpile-typescript',
20+
'window', transpilePackageOrSkip),
1721
Object.keys(constants.BUILD_TYPES).map((buildKey) => packageRunnner(
1822
'build-window-packages:window-bundle',
1923
'window',
@@ -23,12 +27,10 @@ gulp.task('build-window-packages:window-bundle', gulp.series(
2327
));
2428

2529
gulp.task('build-window-packages:version-module', gulp.series(
26-
Object.keys(constants.BUILD_TYPES).map((buildKey) => packageRunnner(
30+
packageRunnner(
2731
'build-window-packages:version-module',
2832
'window',
29-
versionModule,
30-
constants.BUILD_TYPES[buildKey],
31-
))
33+
versionModule)
3234
));
3335

3436
gulp.task('build-window-packages', gulp.series(

gulp-tasks/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gulp.task('lerna-bootstrap', () => {
1919

2020
// If it's not a star, we can scope the build to a specific project.
2121
return lernaWrapper.bootstrap(
22-
'--include-filtered-dependencies',
22+
'--include-dependencies',
2323
'--scope', global.packageOrStar
2424
);
2525
});

gulp-tasks/transpile-typescript.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const transpilePackage = async (packageName) => {
6565
*
6666
* @param {string} packagePath
6767
*/
68-
const transpilePackagesOrSkip = async (packagePath) => {
68+
const transpilePackageOrSkip = async (packagePath) => {
6969
// `packagePath` will be posix style because it comes from `glog()`.
7070
const packageName = packagePath.split('/').slice(-1)[0];
7171

@@ -88,7 +88,7 @@ const debouncedTranspilerMap = {};
8888
/**
8989
* Takes a package name and schedules that package's source TypeScript code
9090
* to be converted to JavaScript. If a transpilation is already scheduled, it
91-
* won't be queued twice, so this function is safe to call as frequenty as
91+
* won't be queued twice, so this function is safe to call as frequently as
9292
* needed.
9393
*
9494
* @param {string} packageName
@@ -121,10 +121,10 @@ const needsTranspile = (packageName) => {
121121
};
122122

123123
gulp.task('transpile-typescript', gulp.series(packageRunnner(
124-
'transpile-typescript', 'all', transpilePackagesOrSkip)));
124+
'transpile-typescript', 'all', transpilePackageOrSkip)));
125125

126126
gulp.task('transpile-typescript:watch', gulp.series(packageRunnner(
127-
'transpile-typescript', 'all', transpilePackagesOrSkip)));
127+
'transpile-typescript', 'all', transpilePackageOrSkip)));
128128

129129
gulp.task('transpile-typescript:watch', () => {
130130
const watcher = gulp.watch(`./${global.packageOrStar}/workbox-*/src/**/*.ts`);
@@ -138,6 +138,7 @@ gulp.task('transpile-typescript:watch', () => {
138138
});
139139

140140
module.exports = {
141+
transpilePackageOrSkip,
141142
queueTranspile,
142143
needsTranspile,
143144
};

gulp-tasks/utils/version-module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const getDetails = (packagePath) => {
1919
return ['workbox', name, pkgJson.version].join(':');
2020
};
2121

22-
module.exports = async (packagePath, buildType) => {
22+
module.exports = async (packagePath) => {
2323
const versionString =
2424
`try{self['${getDetails(packagePath)}']&&_()}catch(e){}`;
2525

0 commit comments

Comments
 (0)