Skip to content

Commit

Permalink
convert to ESM 💥
Browse files Browse the repository at this point in the history
  • Loading branch information
derhuerst committed Aug 20, 2023
1 parent a179d75 commit 3aa48ee
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env node

const min = require('.')
const stream = min()
import createTapMinReporter from './index.js'

const stream = createTapMinReporter()

process.stdin
.pipe(stream)
Expand Down
18 changes: 8 additions & 10 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict'

const {PassThrough} = require('stream')
const duplexer = require('duplexer3')
const hirestime = require('hirestime')
const Parser = require('tap-parser')
const ms = require('pretty-ms')
const chalk = require('chalk')
const util = require('util')
import {PassThrough} from 'node:stream'
import duplexer from 'duplexer3'
import hirestime from 'hirestime'
import {Parser} from 'tap-parser'
import ms from 'pretty-ms'
import chalk from 'chalk'
import util from 'node:util'

const reporter = () => {
const onResults = (data) => {
Expand Down Expand Up @@ -56,4 +54,4 @@ const reporter = () => {
return result
}

module.exports = reporter
export default reporter
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "tap-min",
"version": "2.0.1",
"description": "Minimal TAP output formatter.",
"type": "module",
"bin": {
"tap-min": "cli.js"
},
Expand Down

0 comments on commit 3aa48ee

Please sign in to comment.