polendina 2.0.0-alpha → 2.0.0-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polendina",
3
- "version": "2.0.0-alpha",
3
+ "version": "2.0.0-alpha2",
4
4
  "description": "Non-UI browser testing for JavaScript libraries from the command-line",
5
5
  "main": "polendina.js",
6
6
  "type": "module",
package/polendina.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { promisify } from 'util'
2
2
  import path from 'path'
3
- import fs from 'fs/promises'
3
+ import fs from 'fs'
4
4
  import http from 'http'
5
5
  import { fileURLToPath } from 'url'
6
6
  import st from 'st'
@@ -62,13 +62,13 @@ export class Polendina {
62
62
  config = merge(config, userConfig)
63
63
  }
64
64
 
65
- await fs.mkdir(this.outputDir, { recursive: true })
65
+ await fs.promises.mkdir(this.outputDir, { recursive: true })
66
66
  const copyFiles = ['index.html', 'test-registry.js', 'page-run.js', 'common-run.js', this._runnerModule]
67
67
  if (this._options.runner.startsWith('bare-')) {
68
68
  copyFiles.push('bare.js')
69
69
  }
70
70
  await Promise.all(copyFiles.map((file) => {
71
- return fs.copyFile(path.join(__dirname, 'resources', file), path.join(this.outputDir, file))
71
+ return fs.promises.copyFile(path.join(__dirname, 'resources', file), path.join(this.outputDir, file))
72
72
  }))
73
73
 
74
74
  const stats = await webpack(config)
@@ -89,7 +89,7 @@ export class Polendina {
89
89
 
90
90
  if (this._options.stats) {
91
91
  this.statsFile = path.join(config.output.path, 'webpack-stats.json')
92
- await fs.writeFile(this.statsFile, JSON.stringify(info), 'utf8')
92
+ await fs.promises.writeFile(this.statsFile, JSON.stringify(info), 'utf8')
93
93
  }
94
94
  }
95
95