Skip to content

Feature/oclif upgrade #30

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

Merged
merged 3 commits into from
Apr 23, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

21 changes: 10 additions & 11 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"require": [
"test/helpers/init.js",
"ts-node/register"
],
"watch-extensions": [
"ts"
],
"recursive": true,
"reporter": "spec",
"timeout": 60000
}
"require": [
"ts-node/register"
],
"watch-extensions": [
"ts"
],
"recursive": true,
"reporter": "spec",
"timeout": 60000
}
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"@oclif/prettier-config"
17 changes: 0 additions & 17 deletions bin/dev

This file was deleted.

2 changes: 1 addition & 1 deletion bin/dev.cmd
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@echo off

node "%~dp0\dev" %*
node "%~dp0\dev" %*
7 changes: 7 additions & 0 deletions bin/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node_modules/.bin/ts-node

// eslint-disable-next-line unicorn/prefer-top-level-await
;(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({development: true, dir: __dirname})
})()
5 changes: 0 additions & 5 deletions bin/run

This file was deleted.

7 changes: 7 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env node

// eslint-disable-next-line unicorn/prefer-top-level-await
(async () => {
const oclif = await import('@oclif/core')
await oclif.execute({dir: __dirname})
})()
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {includeIgnoreFile} from '@eslint/compat'
import oclif from 'eslint-config-oclif'
import prettier from 'eslint-config-prettier'
import path from 'node:path'
import {fileURLToPath} from 'node:url'

const gitignorePath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '.gitignore')

export default [
includeIgnoreFile(gitignorePath),
...oclif,
prettier,
{
rules: {
// Turn off to support Node 18. You can remove this rule if you don't need to support Node 18.
'unicorn/prefer-module': 'off',
}
}
]
70 changes: 34 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,73 @@
{
"name": "create-formidable",
"version": "0.0.13",
"version": "0.0.14",
"description": "The Formidable Framework Installer",
"author": "Donald Pakkies @donaldp",
"bin": {
"create-formidable": "./bin/run"
"create-formidable": "./bin/run.js"
},
"homepage": "https://github.com/formidablejs/create-formidable",
"license": "MIT",
"main": "dist/index.js",
"repository": "formidablejs/create-formidable",
"files": [
"/bin",
"/dist",
"/npm-shrinkwrap.json",
"/oclif.manifest.json"
"./bin",
"./dist",
"./oclif.manifest.json"
],
"dependencies": {
"@formidablejs/installer": "^0.9.12",
"@inquirer/prompts": "^1.2.1",
"@oclif/core": "^2",
"@oclif/plugin-help": "^5",
"@oclif/plugin-plugins": "^2.4.7",
"@oclif/plugin-warn-if-update-available": "^2.0.37"
"@formidablejs/installer": "^0.9.13",
"@inquirer/prompts": "^7.4.1",
"@oclif/core": "^4",
"@oclif/plugin-help": "^6",
"@oclif/plugin-plugins": "^5"
},
"devDependencies": {
"@oclif/test": "^2.3.20",
"@eslint/compat": "^1",
"@oclif/prettier-config": "^0.2.1",
"@oclif/test": "^4",
"@types/chai": "^4",
"@types/mocha": "^9.0.0",
"@types/mute-stream": "^0.0.1",
"@types/node": "^16.18.31",
"@types/mocha": "^10",
"@types/node": "^18",
"chai": "^4",
"eslint": "^7.32.0",
"eslint-config-oclif": "^4",
"eslint-config-oclif-typescript": "^1.0.3",
"mocha": "^9",
"oclif": "^3",
"eslint": "^9",
"eslint-config-oclif": "^6",
"eslint-config-prettier": "^10",
"mocha": "^10",
"oclif": "^4",
"shx": "^0.3.3",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "^4.9.5"
"ts-node": "^10",
"typescript": "^5"
},
"oclif": {
"bin": "create-formidable",
"dirname": "create-formidable",
"default": ".",
"commands": "./dist/commands",
"commands": {
"strategy": "single",
"target": "./dist/index.js"
},
"plugins": [
"@oclif/plugin-help",
"@oclif/plugin-warn-if-update-available"
"@oclif/plugin-plugins"
],
"warn-if-update-available": {
"timeoutInDays": 1,
"message": "<%= config.name %> update available from <%= chalk.greenBright(config.version) %> to <%= chalk.greenBright(latest) %>."
}
"topicSeparator": " "
},
"scripts": {
"build": "shx rm -rf dist && tsc -b",
"lint": "eslint . --ext .ts --config .eslintrc",
"lint": "eslint",
"postpack": "shx rm -f oclif.manifest.json",
"posttest": "yarn lint",
"prepack": "yarn build && oclif manifest && oclif readme",
"posttest": "npm run lint",
"prepack": "oclif manifest && oclif readme",
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
"version": "oclif readme && git add README.md"
},
"engines": {
"node": ">=12.0.0"
"node": ">=20.0.0"
},
"bugs": "https://github.com/formidablejs/create-formidable/issues",
"keywords": [
"oclif"
"formidable",
"full-stack"
],
"types": "dist/index.d.ts"
}
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
export {run} from '@oclif/core'
import Create from './commands/index'

export default Create
27 changes: 14 additions & 13 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"compilerOptions": {
"declaration": true,
"importHelpers": true,
"module": "commonjs",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2019",
"esModuleInterop": true
},
"include": [
"src/**/*"
]
"compilerOptions": {
"declaration": true,
"module": "commonjs",
"outDir": "dist",
"rootDir": "src",
"strict": true,
"target": "es2022",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": [
"src/**/*"
]
}
1 change: 1 addition & 0 deletions tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"root":["./src/index.ts","./src/commands/index.ts"],"version":"5.8.3"}
Loading
Loading