Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Node 4, 6, 7, and 9 #115

Merged
merged 5 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
6 changes: 2 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ dist: trusty

language: node_js
node_js:
- "4"
- "6"
- "7"
- "8"
- "10"
- "12"

cache:
yarn: true
Expand Down
6 changes: 2 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
environment:
MOCHA_REPORTER: "mocha-appveyor-reporter"
matrix:
- nodejs_version: "4"
- nodejs_version: "6"
- nodejs_version: "7"
- nodejs_version: "8"
- nodejs_version: "10"
- nodejs_version: "12"

# Install scripts. (runs after repo cloning)
install:
Expand Down
14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ function isNotAPattern(pattern) {
return true;
}

function pathExists(path) {
// creating this function to check if file exist because of issue in node 10+
// ref: https://github.com/nodejs/node/issues/30538
try {
fs.accessSync(path);
fs.statSync(path);
return true;
} catch (e) {
return false;
}
}

Funnel.prototype = Object.create(Plugin.prototype);
Funnel.prototype.constructor = Funnel;
function Funnel(inputNode, _options) {
Expand Down Expand Up @@ -219,7 +231,7 @@ Funnel.prototype.build = function() {
*/

// This is specifically looking for broken symlinks.
let outputPathExists = fs.existsSync(this.outputPath);
let outputPathExists = pathExists(this.outputPath);

// Doesn't count as a rebuild if there's not an existing outputPath.
this._isRebuild = this._isRebuild && outputPathExists;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"index.js"
],
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
"node": "10.* || >= 12.*"
},
"scripts": {
"test": "mocha tests/",
Expand Down
4 changes: 1 addition & 3 deletions tests/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

const fs = require('fs-extra');
const path = require('path');
const RSVP = require('rsvp');
const expect = require('chai').expect;
const walkSync = require('walk-sync');
const broccoli = require('broccoli-builder');
const rimraf = RSVP.denodeify(require('rimraf'));
const fixturify = require('fixturify');

require('mocha-eslint')([
Expand Down Expand Up @@ -463,7 +461,7 @@ describe('broccoli-funnel', function() {

builder = new broccoli.Builder(node);
return builder.build()
.then(() => rimraf(node.outputPath))
stefanpenner marked this conversation as resolved.
Show resolved Hide resolved
.then(() => fs.removeSync(node.outputPath))
.then(() => {
fs.symlinkSync('foo/bar/baz.js', node.outputPath);
})
Expand Down