Skip to content

Commit

Permalink
feat: merge cli-ux library with oclif/core (#345)
Browse files Browse the repository at this point in the history
* feat: merge cli-ux library with oclif/core

Removes the circlular dependency between oclif/core and cli-ux
@W-10255961@

* chore: fix relative paths

* feat: merge cli-ux library with oclif/core

Removes the circlular dependency between oclif/core and cli-ux

* v1.1.2-test-02

* chore: resolve name collision for core/Config and cli-ux/Config

* chore: revert to latest version number

* chore: fix build error

* chore: fix imports in tests

* chore: wrap cli-ux exported members in namespace

* chore: remove unneeded import

* Revert "chore: remove unneeded import"

This reverts commit 8d2f1ec.

* Revert "chore: wrap cli-ux exported members in namespace"

This reverts commit 905e5d5.

* chore: rework cliux namespace export

* chore: document migration

* chore: apply suggestions from code review

Co-authored-by: Juliet Shackell <[email protected]>

* chore: remove unneeded console.log statement

* chore: update migration guide

* chore: fix up examples

* chore: apply review suggestions

* chore: adjust exports

* chore: abandon use of namesapce

* v1.1.2-test-07

* v1.1.2-test-08

* v1.1.2-test-09

* chore: remove use of lodash/castArray

* chore: exclude windows latest, see npm/cli#4234

* fix: integration test command in ci config

* chore: fix integration test job name

Co-authored-by: Juliet Shackell <[email protected]>
Co-authored-by: Rodrigo Espinosa de los Monteros <[email protected]>
  • Loading branch information
3 people authored Jan 26, 2022
1 parent 260b31a commit 27175d6
Show file tree
Hide file tree
Showing 41 changed files with 2,811 additions and 164 deletions.
10 changes: 8 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ workflows:
- latest
- lts
- maintenance
exclude:
- os: windows
node_version: latest
alias: unit-tests
- release-management/test-package:
name: release-management/test-package-yarn test:e2e-<< matrix.node_version >>-<< matrix.os >>
command: yarn test:e2e
matrix:
parameters:
os:
Expand All @@ -29,8 +34,9 @@ workflows:
- latest
- lts
- maintenance
command:
- yarn test:e2e
exclude:
- os: windows
node_version: latest
alias: integration-tests
- release-management/release-package:
context: SF-CLI-RELEASE-PROCESS
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
/node_modules
/tmp
/test/tmp
.DS_Store
4 changes: 2 additions & 2 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Replace imports from the old libraries with `@oclif/core`. For example,
```typescript
import Help from '@oclif/plugin-help';
import {Topic} from '@oclif/config';
import {Command, flags} from '@oclif/command'
import {Command, Flags} from '@oclif/command'
```

With this import:

```typescript
import {Command, flags, Topic, Help} from '@oclif/core';
import {Command, Flags, Topic, Help} from '@oclif/core';
```

## Update your bin scirpts
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Migrating

If you're migrating from the old oclif libraries (`@oclif/config`, `@oclif/command`, `@oclif/error`, `@oclif/parser`), see the [migration guide](./MIGRATION.md).

The `@oclif/core` module now also includes the `cli-ux` module. Merging `cli-ux` into `@oclif/core` resolves a circular dependency between the two modules.
See the [cli-ux README](./src/cli-ux/README.md) for instructions on how to replace the `cli-ux` module with `@oclif/core`.
The [cli-ux README](./src/cli-ux/README.md) also contains detailed usage examples.

Usage
=====

Expand Down
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@
"bugs": "https://github.com/oclif/core/issues",
"dependencies": {
"@oclif/linewrap": "^1.0.0",
"@oclif/screen": "^3.0.2",
"ansi-escapes": "^4.3.0",
"ansi-styles": "^4.2.0",
"cardinal": "^2.1.1",
"chalk": "^4.1.2",
"clean-stack": "^3.0.1",
"cli-ux": "^6.0.6",
"cli-progress": "^3.10.0",
"debug": "^4.3.3",
"ejs": "^3.1.6",
"fs-extra": "^9.1.0",
"get-package-type": "^0.1.0",
"globby": "^11.0.4",
"hyperlinker": "^1.0.0",
"indent-string": "^4.0.0",
"is-wsl": "^2.2.0",
"js-yaml": "^3.13.1",
"lodash": "^4.17.21",
"natural-orderby": "^2.0.3",
"object-treeify": "^1.1.4",
"password-prompt": "^1.1.2",
"semver": "^7.3.5",
"string-width": "^4.2.3",
"strip-ansi": "^6.0.1",
"supports-color": "^8.1.1",
"supports-hyperlinks": "^2.2.0",
"tslib": "^2.3.1",
"widest-line": "^3.1.0",
"wrap-ansi": "^7.0.0"
Expand All @@ -28,12 +40,16 @@
"@oclif/plugin-help": "^5.1.7",
"@oclif/plugin-plugins": "^2.0.8",
"@oclif/test": "^1.2.8",
"@types/ansi-styles": "^3.2.1",
"@types/chai": "^4.2.22",
"@types/chai-as-promised": "^7.1.4",
"@types/clean-stack": "^2.1.1",
"@types/cli-progress": "^3.9.2",
"@types/ejs": "^3.1.0",
"@types/fs-extra": "^9.0.13",
"@types/indent-string": "^4.0.1",
"@types/js-yaml": "^3.12.1",
"@types/lodash": "^4.14.117",
"@types/mocha": "^8.2.3",
"@types/nock": "^11.1.0",
"@types/node": "^15.14.9",
Expand All @@ -42,6 +58,7 @@
"@types/semver": "^7.3.9",
"@types/shelljs": "^0.8.10",
"@types/strip-ansi": "^5.2.1",
"@types/supports-color": "^8.1.1",
"@types/wrap-ansi": "^3.0.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
Expand All @@ -59,7 +76,7 @@
"shx": "^0.3.3",
"sinon": "^11.1.2",
"ts-node": "^9.1.1",
"typescript": "4.5.2"
"typescript": "4.4.4"
},
"resolutions": {
"@oclif/command": "1.8.9",
Expand Down
Loading

0 comments on commit 27175d6

Please sign in to comment.