-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
Test on Node.js 8 #882
Test on Node.js 8 #882
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ test/output | |
!.yarn/releases | ||
.pnp.* | ||
.vscode | ||
scripts/test-legacy-source/output |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
], | ||
"main": "lib/index.js", | ||
"engines": { | ||
"node": ">= 6.9" | ||
"node": ">= 8.9" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was a breaking change in #822, but no one complained 🤷 Also, AVA doesn't work on Node.js 8 so I'm running a smaller single test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
}, | ||
"dependencies": { | ||
"find-cache-dir": "^2.1.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
class App {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const webpack = require("webpack"); | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
const assert = require("assert"); | ||
|
||
const babelLoader = path.join(__dirname, "../lib"); | ||
|
||
const config = { | ||
mode: "development", | ||
entry: path.join(__dirname, "test-legacy-source/input.js"), | ||
output: { | ||
path: path.join(__dirname, "test-legacy-source/output"), | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.jsx?/, | ||
loader: babelLoader, | ||
options: { | ||
presets: ["@babel/preset-env"], | ||
}, | ||
exclude: /node_modules/, | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
webpack(config, (err, stats) => { | ||
assert.strictEqual(err, null); | ||
assert.deepStrictEqual(stats.compilation.errors, []); | ||
assert.deepStrictEqual(stats.compilation.warnings, []); | ||
|
||
fs.readdir(path.join(__dirname, "test-legacy-source/output"), (err, files) => { | ||
assert.strictEqual(err, null); | ||
assert.strictEqual(files.length, 1); | ||
fs.readFile(path.join(__dirname, "test-legacy-source/output", files[0]), (err, data) => { | ||
assert.strictEqual(err, null); | ||
const test = "var App = function App()"; | ||
const subject = data.toString(); | ||
|
||
assert.notStrictEqual(subject.indexOf(test), -1); | ||
|
||
console.log("DONE"); | ||
clearTimeout(timeout); | ||
}); | ||
}); | ||
}); | ||
|
||
const timeout = setTimeout(() => { | ||
console.error("TIMEOUT"); | ||
process.exit(1); | ||
}, 10 * 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The env
YARN_NODE_LINKER
can be moved to the job scope: https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#env