Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "xo/esnext",
"extends": "xo",
"rules": {
"semi": [
"error",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion cli.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

const diff = require('./lib/diff')
import diff from './lib/diff.js'

const output = ({error, result}) => {
if (error) {
Expand Down
4 changes: 2 additions & 2 deletions cli.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const {spawn} = require('child_process')
const test = require('tape')
import {spawn} from 'node:child_process'
import test from 'tape'

const run = async args => {
const stderr = []
Expand Down
4 changes: 2 additions & 2 deletions lib/diff.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const list = require('./list')
import list from './list.js'

const diff = async ({source, target}) => {
const left = await list(source)
Expand All @@ -11,4 +11,4 @@ const diff = async ({source, target}) => {
.map(file => file.name)
}

module.exports = diff
export default diff
4 changes: 2 additions & 2 deletions lib/diff.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const test = require('tape')
const diff = require('./diff')
import test from 'tape'
import diff from './diff.js'

test('diff files, when using same tree', async assert => {
const message = 'diff result must be empty'
Expand Down
6 changes: 3 additions & 3 deletions lib/list.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const fs = require('fs').promises
import path from 'node:path'
import fs from 'node:fs/promises'

const list = async pathdir => {
try {
Expand Down Expand Up @@ -27,4 +27,4 @@ const list = async pathdir => {
}
}

module.exports = list
export default list
4 changes: 2 additions & 2 deletions lib/list.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const test = require('tape')
const list = require('./list')
import test from 'tape'
import list from './list.js'

test('list files, when using flat tree', async assert => {
const message = 'should list 10 files'
Expand Down
Loading