Skip to content

Commit abf99c9

Browse files
fiskerkeithamus
authored andcommitted
chore: update ava to v3 (#153)
* chore: update `ava` to v3 * refactor: remove babel
1 parent 74b1ac1 commit abf99c9

11 files changed

+409
-1203
lines changed

package-lock.json

+384-1,178
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
"devDependencies": {
8484
"@commitlint/cli": "8.3.5",
8585
"@commitlint/config-conventional": "8.3.4",
86-
"ava": "^2.4.0",
86+
"ava": "3.1.0",
8787
"del": "5.1.0",
8888
"dot-prop": "^5.2.0",
8989
"eslint": "^6.7.2",

tests/cli.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import test from 'ava'
2-
import { cliScript, macro } from './_helpers'
3-
import fs from 'fs'
1+
const test = require('ava')
2+
const { cliScript, macro } = require('./_helpers')
3+
const fs = require('fs')
44

55
const badJson = {
66
version: '1.0.0',

tests/deps.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import test from 'ava'
2-
import { macro } from './_helpers'
1+
const test = require('ava')
2+
const { macro } = require('./_helpers')
33

44
// `resolutions` and `dependencies`
55
for (const field of [

tests/eslint.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import test from 'ava'
2-
import sortPackageJson from '..'
3-
import { keysToObject, macro } from './_helpers'
1+
const test = require('ava')
2+
const sortPackageJson = require('..')
3+
const { keysToObject, macro } = require('./_helpers')
44

55
test('eslintIgnore', macro.asItIs, { path: 'eslintIgnore' })
66

tests/fields.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import test from 'ava'
2-
import sortPackageJson from '..'
3-
import { macro, keysToObject } from './_helpers'
4-
import gitHooks from 'git-hooks-list'
1+
const test = require('ava')
2+
const sortPackageJson = require('..')
3+
const { macro, keysToObject } = require('./_helpers')
4+
const gitHooks = require('git-hooks-list')
55

66
// fields sort keep as it is
77
for (const field of [

tests/main.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import test from 'ava'
2-
import sortPackageJson from '..'
3-
import { macro, keysToObject } from './_helpers'
1+
const test = require('ava')
2+
const sortPackageJson = require('..')
3+
const { macro, keysToObject } = require('./_helpers')
44

55
const fields = [...sortPackageJson.sortOrder].sort()
66

tests/options.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import test from 'ava'
2-
import { keysToObject, macro } from './_helpers'
1+
const test = require('ava')
2+
const { keysToObject, macro } = require('./_helpers')
33

44
test('options.sortOrder', macro.sortObject, {
55
options: {

tests/prettier.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import test from 'ava'
2-
import sortPackageJson from '..'
3-
import { keysToObject, macro } from './_helpers'
1+
const test = require('ava')
2+
const sortPackageJson = require('..')
3+
const { keysToObject, macro } = require('./_helpers')
44

55
const prettierConfig = {
66
trailingComma: 'none',

tests/scripts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import test from 'ava'
2-
import { macro } from './_helpers'
1+
const test = require('ava')
2+
const { macro } = require('./_helpers')
33

44
const fixture = {
55
test: 'node test.js',

tests/white-space.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import test from 'ava'
2-
import sortPackageJson from '..'
1+
const test = require('ava')
2+
const sortPackageJson = require('..')
33

44
test('white space', t => {
55
t.is(sortPackageJson('{}'), '{}')

0 commit comments

Comments
 (0)