Skip to content

Commit

Permalink
v9.1.0 - Use jest instead of jest-cli (#163)
Browse files Browse the repository at this point in the history
* v9.1.0: Package upgrades, including jest-cli from 23 to 25

* v9.1.0 - Destructure imports, package bump

* v9.1.0 - Update lint task path

* v9.1.0 - Use node 12 instead of node 8

* v9.1.0 - Node 12 is not compatible with gulp 3
  • Loading branch information
xander-marjoram authored Feb 21, 2020
1 parent 9ca3203 commit e82b94e
Show file tree
Hide file tree
Showing 5 changed files with 2,282 additions and 1,272 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: node_js

node_js:
- "8"
- "10"

cache: yarn
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


v9.1.0
------------------------------
*February 19, 2020*

## Changed
- Upgrade `jest-cli` to v25, and use `jest` package instead to support `runCLI` command
- Minor package updates
- Destructure some imports


v9.0.1
------------------------------
*December 11, 2019*
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justeat/gulp-build-fozzie",
"version": "9.0.1",
"version": "9.1.0",
"description": "Gulp build tasks for use across Fozzie modules",
"main": "index.js",
"author": "Damian Mullins <[email protected]> (http://www.damianmullins.com)",
Expand All @@ -21,29 +21,29 @@
"test": "jest",
"test:cover": "jest --coverage",
"test:cover:CI": "cat coverage/lcov.info | coveralls",
"lint": "eslint '**/*.js' --fix",
"lint": "eslint \"**/*.js\" --fix",
"release-patch": "release-it patch --non-interactive -p",
"release-minor": "release-it minor --non-interactive -p",
"release-major": "release-it major --non-interactive -p"
},
"dependencies": {
"@babel/cli": "7.7.0",
"@babel/core": "7.7.2",
"@babel/preset-env": "7.7.1",
"@justeat/eslint-config-fozzie": "3.3.1",
"@babel/cli": "7.8.4",
"@babel/core": "7.8.4",
"@babel/preset-env": "7.8.4",
"@justeat/eslint-config-fozzie": "3.4.0",
"@justeat/f-copy-assets": "1.1.0",
"@justeat/f-templates-loader": "0.1.1",
"@justeat/gulp-gh-pages": "1.0.3",
"@justeat/stylelint-config-fozzie": "2.0.1",
"assemble": "0.24.3",
"autoprefixer": "9.7.1",
"autoprefixer": "9.7.4",
"babelify": "10.0.0",
"browser-sync": "2.26.7",
"browserify": "16.5.0",
"cssnano": "4.1.10",
"del": "3.0.0",
"eslint": "6.6.0",
"eslint-plugin-import": "2.18.2",
"eslint": "6.8.0",
"eslint-plugin-import": "2.20.1",
"event-stream": "3.3.4",
"exorcist": "1.0.1",
"eyeglass": "1.4.1",
Expand All @@ -64,7 +64,7 @@
"gulp-rename": "1.4.0",
"gulp-rev": "8.1.1",
"gulp-sass": "4.0.2",
"gulp-sass-variables": "1.1.1",
"gulp-sass-variables": "1.2.0",
"gulp-size": "3.0.0",
"gulp-sourcemaps": "2.6.5",
"gulp-strip-debug": "3.0.0",
Expand All @@ -78,7 +78,7 @@
"handlebars-helpers": "0.10.0",
"helper-markdown": "1.0.0",
"helper-md": "0.2.2",
"jest-cli": "23.6.0",
"jest": "25.1.0",
"lodash.union": "4.6.0",
"merge-stream": "1.0.1",
"postcss-assets": "5.0.0",
Expand All @@ -93,7 +93,7 @@
},
"devDependencies": {
"concurrently": "4.1.0",
"coveralls": "3.0.7",
"coveralls": "3.0.9",
"danger": "6.1.6",
"lodash.clonedeep": "4.5.0",
"release-it": "8.1.0"
Expand Down
18 changes: 9 additions & 9 deletions tasks/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ const exorcist = require('exorcist');
const eslint = require('gulp-eslint');

// jest packages
const jest = require('jest-cli');
const path = require('path');
const { runCLI } = require('jest');
const { resolve } = require('path');

// bundle packages
const browserify = require('browserify');
const babelify = require('babelify');
const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer');
const es = require('event-stream');
const sourcemaps = require('gulp-sourcemaps');
const { merge } = require('event-stream');
const { init, write } = require('gulp-sourcemaps');
const uglify = require('gulp-uglify-es').default;
const rename = require('gulp-rename');
const rev = require('gulp-rev');
Expand Down Expand Up @@ -61,9 +61,9 @@ gulp.task('scripts:lint', () => gulp.src([`${pathBuilder.jsSrcDir}/**/*.js`, ...
.pipe(eslint.failAfterError()));


const jestTestRun = (args = {}) => jest.runCLI(
const jestTestRun = (args = {}) => runCLI(
{ bail: config.isProduction, passWithNoTests: true, ...args },
[path.resolve(process.cwd())]
[resolve(process.cwd())]
);

/**
Expand Down Expand Up @@ -142,7 +142,7 @@ gulp.task('scripts:bundle', () => {
// capture sourcemaps from transforms
.pipe(gulpif(
config.isDev,
sourcemaps.init({ loadMaps: true })
init({ loadMaps: true })
))

// if production build, rip out our console logs
Expand All @@ -167,7 +167,7 @@ gulp.task('scripts:bundle', () => {
// write the sourcemap to a separate file
.pipe(gulpif(
config.isDev,
sourcemaps.write('.')
write('.')
))

// output to docs assets folder
Expand Down Expand Up @@ -197,5 +197,5 @@ gulp.task('scripts:bundle', () => {
.pipe(gulp.dest(pathBuilder.jsDistDir));
});

return es.merge(...bundleTasks);
return merge(...bundleTasks);
});
Loading

0 comments on commit e82b94e

Please sign in to comment.