Skip to content

Commit

Permalink
chore: upgrade depenendecies
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Oct 29, 2020
1 parent 3319323 commit 567271d
Show file tree
Hide file tree
Showing 5 changed files with 4,092 additions and 3,425 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
jest: true,
},
rules: {
'import/no-commonjs': false,
'import/no-commonjs': 'off',
}
}
39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,22 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@types/babel__core": "^7.0.4",
"@types/jest": "^23.3.10",
"@types/node": "^10.12.15",
"codecov": "^3.1.0",
"conventional-changelog-cli": "^2.0.11",
"eslint": "^5.9.0",
"eslint-config-satya164": "^2.0.1",
"husky": "^1.2.0",
"jest": "^23.6.0",
"jest-file-snapshot": "^0.2.1",
"prettier": "^1.15.2",
"release-it": "^9.1.0",
"ts-jest": "^23.10.5",
"typescript": "^3.2.2"
"@babel/core": "^7.12.3",
"@types/babel__core": "^7.1.10",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.6",
"babel-core": "^6.26.3",
"codecov": "^3.8.0",
"conventional-changelog-cli": "^2.1.0",
"eslint": "^7.12.1",
"eslint-config-satya164": "^3.1.8",
"husky": "^4.3.0",
"jest": "^26.6.1",
"jest-file-snapshot": "^0.3.8",
"prettier": "^2.1.2",
"release-it": "^14.2.0",
"ts-jest": "^26.4.3",
"typescript": "^4.0.5"
},
"jest": {
"testEnvironment": "node",
Expand All @@ -64,10 +65,10 @@
}
},
"dependencies": {
"chalk": "^2.4.1",
"error-stack-parser": "^2.0.2",
"escape-string-regexp": "^1.0.5",
"strip-ansi": "^5.0.0"
"chalk": "^4.1.0",
"error-stack-parser": "^2.0.6",
"escape-string-regexp": "^4.0.0",
"strip-ansi": "^6.0.0"
},
"husky": {
"hooks": {
Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable jest/consistent-test-it */

const path = require('path');
const { toMatchFile } = require('jest-file-snapshot');
const { create } = require('../index') as typeof import('babel-test');
Expand Down
15 changes: 7 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable jest/no-disabled-tests, jest/no-focused-tests */
/* istanbul ignore file */

const fs = require('fs');
Expand Down Expand Up @@ -69,8 +68,8 @@ exports.create = function create(config) {
}

fs.readdirSync(directory)
.filter(f => fs.lstatSync(path.join(directory, f)).isDirectory())
.forEach(f => {
.filter((f) => fs.lstatSync(path.join(directory, f)).isDirectory())
.forEach((f) => {
// Respect skip. and only. prefixes in folder names
const t = f.startsWith('skip.')
? it.skip
Expand All @@ -83,7 +82,7 @@ exports.create = function create(config) {
const content = fs.readFileSync(filename, 'utf8');

return Promise.resolve(callback(content, { filename })).then(
output => {
(output) => {
try {
if ('expect' in global) {
// Use `expect` for assertions if available, for example when using Jest
Expand Down Expand Up @@ -118,11 +117,11 @@ exports.create = function create(config) {
});
};

const helper = e => (code, { filename }) => {
const helper = (e) => (code, { filename }) => {
// We should filter out stack traces from the library
const stack = ErrorStackParser.parse(e)
.filter(s => s.fileName !== __filename)
.map(s => s.source)
.filter((s) => s.fileName !== __filename)
.map((s) => s.source)
.join('\n');

const output = path.join(path.dirname(filename), 'output.js');
Expand Down Expand Up @@ -160,7 +159,7 @@ exports.create = function create(config) {
content: code + '\n',
stack,
}),
e => ({
(e) => ({
filename: error,
// Errors might have ansi colors, for example babel codeframe error
// Strip them so the error is more readable
Expand Down
Loading

0 comments on commit 567271d

Please sign in to comment.