Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update npm create feathers to ES module #3393

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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