Skip to content

Commit e630c94

Browse files
Copilotkobenguyent
andcommitted
Convert CJS to ESM: htmlReporter plugin (3648 lines - largest file)
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
1 parent c566c0e commit e630c94

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/plugin/htmlReporter.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
// TypeScript: Import Node.js types for process, fs, path, etc.
33
/// <reference types="node" />
44

5-
const fs = require('fs')
6-
const path = require('path')
7-
const mkdirp = require('mkdirp')
8-
const crypto = require('crypto')
9-
const { threadId } = require('worker_threads')
10-
const { template } = require('../utils')
11-
const { getMachineInfo } = require('../command/info')
12-
13-
const event = require('../event')
14-
const output = require('../output')
15-
const Codecept = require('../codecept')
5+
import fs from 'fs'
6+
import path from 'path'
7+
import mkdirp from 'mkdirp'
8+
import crypto from 'crypto'
9+
import { threadId } from 'worker_threads'
10+
import { template } from '../utils.js'
11+
import { getMachineInfo } from '../command/info.js'
12+
13+
import event from '../event.js'
14+
import output from '../output.js'
15+
import Codecept from '../codecept.js'
1616

1717
const defaultConfig = {
1818
output: typeof global !== 'undefined' && global.output_dir ? global.output_dir : './output',
@@ -62,7 +62,7 @@ const defaultConfig = {
6262
* }
6363
* ```
6464
*/
65-
module.exports = function (config) {
65+
export default function (config) {
6666
const options = { ...defaultConfig, ...config }
6767
/**
6868
* TypeScript: Explicitly type reportData arrays as any[] to avoid 'never' errors

0 commit comments

Comments
 (0)