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

Remove just-scripts-utils and just-task-logger packages #701

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented Mar 10, 2023

Originally just-scripts-utils and just-task-logger were used by multiple packages in the Just family (such as for repo creation and management), but now that the focus of Just has been narrowed to task orchestration, those utils are only directly used in one package each.

This PR merges just-scripts-utils into just-scripts, and just-task-logger into just-task. This simplifies the repo setup and reduces maintenance overhead a bit.

Based on internal usage, the following new exports were added to replace those from the util packages:

  • just-scripts: encodeArgs

const { mockExecFactory } = require('./mockExecFactory');
return mockExecFactory();
jest.mock('../../utils', () => {
const originalModule = jest.requireActual('../../utils');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved from the mockExecFactory file (which was very simple and only used in one place)

Comment on lines -2 to -4
export * from './interfaces/PackageJson';
export * from './interfaces/RushJson';
export * from './logger';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • PackageJson was moved to a different location, not under the utils folder
  • RushJson types are removed: they weren't used anywhere, and weren't re-exported from just-scripts
  • This was a re-export of the logger package which is now redundant

@@ -1 +1,85 @@
export * from 'just-task-logger';
import chalk = require('chalk');
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is NOT new code, just a move/merge of the files just-task-logger/src/logger.ts and just-task-logger/src/mark.ts (the mark file was small, so it was easier to just consolidate them)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant