Skip to content

Commit 314ce70

Browse files
authored
fix: Update npm create feathers to ES module (#3393)
1 parent a39910e commit 314ce70

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/create-feathers/bin/create-feathers

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env node
22
'use strict';
33

4-
const path = require('path')
5-
const { existsSync } = require('fs')
6-
const { mkdir } = require('fs/promises')
7-
const { Command, commandRunner, chalk } = require('@feathersjs/cli')
4+
import path from 'path'
5+
import { existsSync } from 'fs'
6+
import { mkdir } from 'fs/promises'
7+
import { Command, commandRunner, chalk } from '@feathersjs/cli'
88

99
const program = new Command()
1010
const generateApp = commandRunner('app')
@@ -21,7 +21,7 @@ ${chalk.grey('npm init feathers myapp')}
2121
.action(async (name, options) => {
2222
try {
2323
const cwd = path.join(process.cwd(), name)
24-
24+
2525
if (existsSync(cwd)) {
2626
throw new Error(`Can not create Feathers application, the folder "${name}" already exists`)
2727
}

packages/create-feathers/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"bin": {
77
"create-feathers": "./bin/create-feathers"
88
},
9+
"type": "module",
910
"keywords": [
1011
"feathers",
1112
"feathers-plugin"
@@ -29,7 +30,7 @@
2930
"url": "https://github.com/feathersjs/feathers/issues"
3031
},
3132
"engines": {
32-
"node": ">= 14"
33+
"node": ">= 18"
3334
},
3435
"files": [
3536
"CHANGELOG.md",
@@ -41,7 +42,7 @@
4142
"*.js"
4243
],
4344
"scripts": {
44-
"test": "echo \"No tests necessary\""
45+
"test": "bin/create-feathers --help"
4546
},
4647
"publishConfig": {
4748
"access": "public"

0 commit comments

Comments
 (0)