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 CLI build issue #578

Merged
merged 3 commits into from
Feb 21, 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
5 changes: 5 additions & 0 deletions .changeset/stale-owls-own.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@e2b/cli': patch
---

Fix ESM import for older node versions
12 changes: 5 additions & 7 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
#!/usr/bin/env -S node --enable-source-maps

import * as updateNotifier from 'update-notifier'

import updateNotifier from 'update-notifier'
import * as commander from 'commander'
import * as packageJSON from '../package.json'
import { program } from './commands'
import { commands2md } from './utils/commands2md'

export const pkg = packageJSON

updateNotifier
.default({
pkg,
updateCheckInterval: 1000 * 60 * 60 * 8, // 8 hours
})
updateNotifier({
pkg,
updateCheckInterval:1000 * 60 * 60 * 8, // 8 hours
})
.notify()

const prog = program.version(
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/tsup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineConfig } from 'tsup'

import * as packageJSON from './package.json'

const excludedPackages = ['update-notifier', 'inquirer']
const excludedPackages = ['inquirer']

export default defineConfig({
entry: ['src/index.ts'],
Expand Down