Skip to content

Commit

Permalink
feat: migrate @oclif/core from v2 to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Amzani committed Mar 13, 2024
1 parent 5c61063 commit 37f9563
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 287 deletions.
20 changes: 3 additions & 17 deletions bin/dev
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env nod

const oclif = require('@oclif/core')

const path = require('path')
const project = path.join(__dirname, '..', 'tsconfig.json')

// In dev mode -> use ts-node and dev plugins
process.env.NODE_ENV = 'development'

require('ts-node').register({project})

// In dev mode, always show stack traces
oclif.settings.debug = true;

// Start the CLI
oclif.run().then(oclif.flush).catch(oclif.Errors.handle)
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning

import {execute} from '@oclif/core';
await execute({development: true, dir: import.meta.url});
9 changes: 2 additions & 7 deletions bin/run
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
#!/usr/bin/env node

const oclif = require('@oclif/core');
import {execute} from '@oclif/core';

oclif.run()
.then(require('@oclif/core/flush'))
.catch((err) => {
const oclifHandler = require('@oclif/core/handle');
return oclifHandler(err.message);
});
await execute({dir: import.meta.url});

Loading

0 comments on commit 37f9563

Please sign in to comment.