Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
test:
name: Node.js ${{ matrix.node }} / Babel ${{ matrix.babel }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [8, 22, 24, 26]
babel: [7, 8]
exclude:
# Babel 8 requires Node.js 20+, so it cannot run on Node.js 8.
- node: 8
babel: 8
steps:
- uses: actions/checkout@v4

- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install dependencies (Babel 7)
run: yarn install --frozen-lockfile

- name: Upgrade dev dependencies to Babel 8
if: matrix.babel == 8
run: >-
yarn add --dev
@babel/core@^8.0.0
@babel/plugin-transform-arrow-functions@^8.0.0
@babel/plugin-transform-block-scoping@^8.0.0
@babel/plugin-transform-classes@^8.0.0

- name: Run tests
run: yarn test
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = function (opts) {
}

if (!supportsCallerOption()) {
cb(new PluginError('gulp-babel', '@babel/core@^7.0.0 is required'));
cb(new PluginError('gulp-babel', '@babel/core@>=7.0.0 is required'));
return;
}

Expand Down Expand Up @@ -75,7 +75,7 @@ function supportsCallerOption() {
try {
// Rather than try to match the Babel version, we just see if it throws
// when passed a 'caller' flag, and use that to decide if it is supported.
babel.loadPartialConfig({
(babel.loadPartialConfigSync || babel.loadPartialConfig)({
caller: undefined,
babelrc: false,
configFile: false
Expand Down
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"node": ">=6"
},
"scripts": {
"test": "xo && mocha"
"test": "mocha"
},
"pre-commit": {
"run": [
Expand Down Expand Up @@ -44,7 +44,7 @@
"vinyl-sourcemaps-apply": "^0.2.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
"@babel/core": "^7.0.0 || ^8.0.0"
},
"devDependencies": {
"@babel/core": "^7.0.0",
Expand All @@ -54,13 +54,6 @@
"gulp-sourcemaps": "^2.6.4",
"mocha": "^6.2.1",
"pre-commit": "^1.2.2",
"vinyl": "^2.1.0",
"xo": "^0.25.3"
},
"xo": {
"envs": [
"node",
"mocha"
]
"vinyl": "^2.1.0"
}
}
Loading
Loading