Skip to content

Commit

Permalink
fix: Update npm create feathers to ES module (#3393)
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl authored Jan 22, 2024
1 parent a39910e commit 314ce70
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/create-feathers/bin/create-feathers
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node
'use strict';

const path = require('path')
const { existsSync } = require('fs')
const { mkdir } = require('fs/promises')
const { Command, commandRunner, chalk } = require('@feathersjs/cli')
import path from 'path'
import { existsSync } from 'fs'
import { mkdir } from 'fs/promises'
import { Command, commandRunner, chalk } from '@feathersjs/cli'

const program = new Command()
const generateApp = commandRunner('app')
Expand All @@ -21,7 +21,7 @@ ${chalk.grey('npm init feathers myapp')}
.action(async (name, options) => {
try {
const cwd = path.join(process.cwd(), name)

if (existsSync(cwd)) {
throw new Error(`Can not create Feathers application, the folder "${name}" already exists`)
}
Expand Down
5 changes: 3 additions & 2 deletions packages/create-feathers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"bin": {
"create-feathers": "./bin/create-feathers"
},
"type": "module",
"keywords": [
"feathers",
"feathers-plugin"
Expand All @@ -29,7 +30,7 @@
"url": "https://github.com/feathersjs/feathers/issues"
},
"engines": {
"node": ">= 14"
"node": ">= 18"
},
"files": [
"CHANGELOG.md",
Expand All @@ -41,7 +42,7 @@
"*.js"
],
"scripts": {
"test": "echo \"No tests necessary\""
"test": "bin/create-feathers --help"
},
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit 314ce70

Please sign in to comment.