Skip to content

Commit

Permalink
Fix(inquirer): Fix changed paths from internals used by plugin vendor…
Browse files Browse the repository at this point in the history
…s. (#1457)

* Chore(turbo): Consider root tsconfig.json as a dependency

* Fix(inquirer): Fix changed paths from internals used by plugin vendors. Fix #1456
  • Loading branch information
SBoudrias authored Jul 3, 2024
1 parent 8e6fdf1 commit fb32a00
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
16 changes: 16 additions & 0 deletions integration/esm/integration.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ import inquirer, { createPromptModule } from 'inquirer';
import test from 'node:test';
import assert from 'node:assert';

import Base from 'inquirer/lib/prompts/base.js';
import Choices from 'inquirer/lib/objects/choices.js';
import Separator from 'inquirer/lib/objects/separator.js';
import observe from 'inquirer/lib/utils/events.js';
import * as utils from 'inquirer/lib/utils/readline.js';
import Paginator from 'inquirer/lib/utils/paginator.js';

test('[ESM] @inquirer/prompts should be exported', () => {
assert(input instanceof Function);
});
Expand All @@ -23,3 +30,12 @@ test('[ESM] inquirer should be exported', () => {
assert(inquirer.createPromptModule instanceof Function);
assert(createPromptModule instanceof Function);
});

test('[ESM] inquirer custom prompts util paths are stable', () => {
assert(Base != null);
assert(Choices != null);
assert(Separator != null);
assert(observe != null);
assert(utils != null);
assert(Paginator != null);
});
25 changes: 24 additions & 1 deletion packages/inquirer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,28 @@
"yoctocolors-cjs": "^2.1.1"
},
"homepage": "https://github.com/SBoudrias/Inquirer.js/blob/master/packages/inquirer/README.md",
"sideEffects": false
"sideEffects": false,
"exports": {
".": {
"import": "./src/index.js"
},
"./lib/objects/choices.js": {
"import": "./src/objects/choices.js"
},
"./lib/objects/separator.js": {
"import": "./src/objects/separator.js"
},
"./lib/prompts/base.js": {
"import": "./src/prompts/base.js"
},
"./lib/utils/events.js": {
"import": "./src/utils/events.js"
},
"./lib/utils/paginator.js": {
"import": "./src/utils/paginator.js"
},
"./lib/utils/readline.js": {
"import": "./src/utils/readline.js"
}
}
}
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tsc": {
"dependsOn": ["^tsc"],
"outputs": ["dist/**"],
"inputs": ["$TURBO_DEFAULT$", "../../tools/fix-ext.mjs"]
"inputs": ["$TURBO_DEFAULT$", "../../tools/fix-ext.mjs", "../../tsconfig.json"]
},
"attw": {
"dependsOn": ["tsc"],
Expand Down

0 comments on commit fb32a00

Please sign in to comment.