Skip to content

Commit b0b5c3c

Browse files
committed
feat: update chalk to 4.1.0
closes #322 closes #322
1 parent b0674bd commit b0b5c3c

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"babel-loader": "8.1.0",
2828
"babel-runtime": "6.26.0",
2929
"case-sensitive-paths-webpack-plugin": "2.3.0",
30-
"chalk": "2.4.2",
30+
"chalk": "4.1.0",
3131
"cli-table": "0.3.1",
3232
"connect-history-api-fallback": "1.6.0",
3333
"copy-webpack-plugin": "5.1.2",

scripts/utils/formatElmCompilerErrors.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
var chalk = require('chalk');
4-
var ctx = new chalk.constructor({ enabled: true });
4+
var ctx = new chalk.Instance({ enabled: true });
55
var error = ctx.bold.red;
66
var filename = ctx.cyan;
77
var isBrowser = typeof window === 'object';
@@ -28,16 +28,16 @@ module.exports = function formatElmCompilerErrors(messages) {
2828
return errors.length > 0
2929
? {
3030
errors: errors
31-
.map(x =>
31+
.map((x) =>
3232
x
3333
.replace(/(--\s[A-Z\s]+-+\s.*\.elm\r?\n)/g, filename('$1'))
3434
.replace(/(\n\s*)(\^+)/g, '$1' + error('$2'))
3535
.replace(/(\d+)(\|>)/g, '$1' + error('$2'))
3636
)
3737
.map(stripRedundantInfo)
3838
// drop errors that only contain whitespace
39-
.filter(err => err.trim()),
40-
warnings: warnings
39+
.filter((err) => err.trim()),
40+
warnings: warnings,
4141
}
4242
: messages;
4343
};

tests/elm-app.eject.spec.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ const testAppDir = path.join(rootDir, testAppName);
1212
const createElmAppCmd = path.join(rootDir, 'bin/create-elm-app-cli.js');
1313
const elmAppCmd = path.join(rootDir, 'bin/elm-app-cli.js');
1414

15-
describe('Ejecting Elm application. (Please wait...)', function() {
15+
describe('Ejecting Elm application. (Please wait...)', function () {
1616
this.timeout(60000);
1717

18-
before(done => {
18+
before((done) => {
1919
const { status } = spawn.sync('node', [createElmAppCmd, testAppName]);
2020
if (status === 0) {
2121
process.chdir(testAppDir);
@@ -33,7 +33,7 @@ describe('Ejecting Elm application. (Please wait...)', function() {
3333
it(`'elm-app eject' should succeed in '${testAppName}'`, () => {
3434
const { status, output } = spawn.sync('node', [elmAppCmd, 'eject']);
3535
const outputString = output
36-
.map(out => (out !== null ? out.toString() : ''))
36+
.map((out) => (out !== null ? out.toString() : ''))
3737
.join('');
3838

3939
expect(status, 'to be', 0);
@@ -50,7 +50,7 @@ describe('Ejecting Elm application. (Please wait...)', function() {
5050
start: 'node scripts/start.js',
5151
make: 'elm make',
5252
repl: 'elm repl',
53-
reactor: 'elm reactor'
53+
reactor: 'elm reactor',
5454
});
5555
});
5656

@@ -77,9 +77,10 @@ describe('Ejecting Elm application. (Please wait...)', function() {
7777
it('It should be possible to build ejected application, using npm scripts', () => {
7878
const { status, output } = spawn.sync('npm', ['run', 'build']);
7979
const outputString = output
80-
.map(out => (out !== null ? out.toString() : ''))
80+
.map((out) => (out !== null ? out.toString() : ''))
8181
.join('');
8282

83+
console.log(outputString);
8384
expect(status, 'to be', 0);
8485
expect(outputString, 'to contain', 'Compiled successfully');
8586
}).timeout(5 * 60 * 1000);

0 commit comments

Comments
 (0)