@sequencemedia/gulp-cli 1.1.33 → 1.1.35

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": "@sequencemedia/gulp-cli",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "description": "The command line interface to Gulp",
5
5
  "keywords": [
6
6
  "build",
@@ -33,7 +33,7 @@
33
33
  "gulp": "./bin/gulp.mjs"
34
34
  },
35
35
  "dependencies": {
36
- "@sequencemedia/gulp-log": "^1.0.49",
36
+ "@sequencemedia/gulp-log": "^1.0.50",
37
37
  "@sequencemedia/liftoff": "1.0.0",
38
38
  "ansi-colors": "^4.1.3",
39
39
  "archy": "^1.0.0",
@@ -1,4 +1,9 @@
1
+ import {
2
+ pathToFileURL
3
+ } from 'node:url'
4
+
1
5
  import copyProps from 'copy-props'
6
+
2
7
  import {
3
8
  join,
4
9
  extname,
@@ -24,10 +29,12 @@ export default async function loadConfigFiles (configFiles = {}, configFileOrder
24
29
  const filePath = configFiles[key]
25
30
 
26
31
  try {
32
+ const fileUrl = pathToFileURL(resolve(join(process.cwd(), filePath)))
33
+
27
34
  const module = (
28
35
  extname(filePath) === '.json'
29
- ? await import(resolve(join(process.cwd(), filePath)), { assert: { type: 'json' } })
30
- : await import(resolve(join(process.cwd(), filePath)))
36
+ ? await import(fileUrl, { assert: { type: 'json' } })
37
+ : await import(fileUrl)
31
38
  )
32
39
 
33
40
  copyProps(getConfig(module), config, ({ keyChain, value }) => {
package/src/index.mjs CHANGED
@@ -1,3 +1,7 @@
1
+ import {
2
+ pathToFileURL
3
+ } from 'node:url'
4
+
1
5
  import stdout from 'mute-stdout'
2
6
 
3
7
  import listenForGulpEvents from './log/listen-for-gulp-events.mjs'
@@ -13,8 +17,10 @@ function getImportFromModulePath (params) {
13
17
  }
14
18
  } = params
15
19
 
20
+ const fileUrl = pathToFileURL(modulePath)
21
+
16
22
  return (
17
- import(modulePath)
23
+ import(fileUrl)
18
24
  .then(({ default: gulp }) => Object.assign(params, { gulp }))
19
25
  )
20
26
  }
@@ -26,8 +32,10 @@ function getImportFromConfigPath (params) {
26
32
  }
27
33
  } = params
28
34
 
35
+ const fileUrl = pathToFileURL(configPath)
36
+
29
37
  return (
30
- import(configPath)
38
+ import(fileUrl)
31
39
  .then((tasks) => Object.assign(params, { tasks }))
32
40
  )
33
41
  }
@@ -1,3 +1,7 @@
1
+ import {
2
+ pathToFileURL
3
+ } from 'node:url'
4
+
1
5
  import {
2
6
  join
3
7
  } from 'node:path'
@@ -7,11 +11,14 @@ import exit from './exit.mjs'
7
11
  import ROOT from '#where-am-i'
8
12
 
9
13
  async function getGulpCliVersion () {
14
+ const fileUrl = pathToFileURL(join(ROOT, 'package.json'))
15
+
10
16
  const {
11
17
  default: {
12
18
  version
13
19
  }
14
- } = await import(join(ROOT, 'package.json'), { assert: { type: 'json' } })
20
+ } = await import(fileUrl, { assert: { type: 'json' } })
21
+
15
22
  return version
16
23
  }
17
24