-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Build script to setup ESM/CJS module exports #1185
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
README.md | ||
lib-* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const inquirer = require("./inquirer.js").default; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd recommend adding this file to the eslint ignore. It errors on CI now since it's using common.js syntax - and wouldn't compile as-is. |
||
|
||
module.exports = inquirer; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
* `list` type prompt | ||
*/ | ||
|
||
import chalk from 'chalk'; | ||
import cliCursor from 'cli-cursor'; | ||
import figures from 'figures'; | ||
import chalk from '#chalk'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there eslint rules to enforce to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll also need to fix the |
||
import cliCursor from '#cli-cursor'; | ||
import figures from '#figures'; | ||
import { map, takeUntil } from 'rxjs'; | ||
import Base from './base.js'; | ||
import observe from '../utils/events.js'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import ansiEscapes from 'ansi-escapes'; | ||
import ansiEscapes from '#ansi-escapes'; | ||
|
||
/** | ||
* Move cursor left by `x` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"checkJs": false, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true | ||
}, | ||
"include": [ | ||
"./lib/**/*.js" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.base", | ||
"compilerOptions": { | ||
"lib": ["ES6"], | ||
"target": "ES6", | ||
"module": "CommonJS", | ||
"moduleResolution": "Node", | ||
"outDir": "./lib-cjs" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.base", | ||
"compilerOptions": { | ||
"lib": ["ES2022"], | ||
"target": "ES2022", | ||
"module": "ESNext", | ||
"moduleResolution": "NodeNext", | ||
"outDir": "./lib" | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file sneaked in the diff (prob added/commited before the
.gitignore
change)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see this is desired. Let's update the
.gitignore
so this file is included not ignored by Git.