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

BREAKING CHANGE: Lerna/monorepo refactor package split #199

Merged
merged 9 commits into from
Dec 3, 2018

Conversation

bingenito
Copy link
Member

@bingenito bingenito commented Nov 16, 2018

Split into 3 packages:

  • @morgan-stanley/desktopjs
  • @morgan-stanley/desktopjs-electron
  • @morgan-stanley/desktpojs-openfin

Fixes #196

Split into 3 packages:
- @morgan-stanley/desktopjs
- @morgan-stanley/desktopjs-electron
- @morgan-stanley/desktpojs-openfin
@@ -3,7 +3,10 @@
"version": "0.0.0",
"description": "desktopJS Demo",
"main": "electron.js",
"private": true,
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 one of the lerna packages so the desktopjs symlink works but we don't want it published.

package.json Outdated
"gulp-typedoc": "^2.0.2",
"gulp-typescript": "^4.0.1",
"gulp-uglify": "^3.0.0",
"gulp-typescript": "^5.0.0-alpha.3",
Copy link
Member Author

Choose a reason for hiding this comment

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

Just noticing this. It must have been tagged as latest. If there are any objects I'll manually pin but greenkeeper will probably try and upgrade.

Copy link
Member

Choose a reason for hiding this comment

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

yeah, it should be a non alpha at least

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@@ -0,0 +1,3 @@
# @morgan-stanley/desktopjs-electron
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 mostly a placeholder readme. I'm debating whether I'll have info here or just link to the main project as-is.

@@ -231,10 +230,10 @@ export class ElectronContainerWindow extends ContainerWindow {
* @augments MessageBus
*/
export class ElectronMessageBus implements MessageBus {
public ipc: NodeJS.EventEmitter;
public ipc: any;
Copy link
Member Author

Choose a reason for hiding this comment

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

Getting rid of exposed node types to avoid upstream pain when devs attempt to build.

Copy link
Member

Choose a reason for hiding this comment

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

we should mention it in release notes as a breaking change

Copy link
Member Author

Choose a reason for hiding this comment

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

Will be in release notes

@@ -1,20 +1,24 @@
{
"compilerOptions": {
"target": "es5",
"target": "es6",
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 staging project used for tests and dts generation, not the actual build which is still es5/rollup -> umd.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed back to es5

@@ -0,0 +1,3 @@
# @morgan-stanley/desktopjs-openfin
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 mostly a placeholder readme. I'm debating whether I'll have info here or just link to the main project as-is.

private uuid: string;

public constructor(bus: fin.OpenFinInterApplicationBus, uuid: string) {
public constructor(bus: any, uuid: string) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Avoid exposing OpenFin types to alleviate pain of upstream consumer.

Copy link
Member

Choose a reason for hiding this comment

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

same as above, we should add this to release notes

Copy link
Member Author

Choose a reason for hiding this comment

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

Will be in release notes

describe("createWindow", () => {
beforeEach(() => {
spyOn(desktop, "Window").and.callFake((options?: any, callback?: Function) => { if (callback) { callback(); } });
});

it("defaults", (done) => {
xit("defaults", (done) => {
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 part of the WIP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

container.createWindow("url").then(win => {
expect(win).toBeDefined();
expect(desktop.Window).toHaveBeenCalledWith({ autoShow: true, url: "url", name: jasmine.stringMatching(/\w{8}-\w{4}-\w{4}-\w{4}-\w{12}/), customData: undefined }, jasmine.any(Function), jasmine.any(Function));
done();
});
});

it("createWindow defaults", (done) => {
xit("createWindow defaults", (done) => {
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 part of the WIP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

.gitignore Show resolved Hide resolved

// @ts-ignore
Copy link
Member Author

Choose a reason for hiding this comment

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

ts-ignore in tests are part of WIP

Copy link
Member Author

@bingenito bingenito Nov 28, 2018

Choose a reason for hiding this comment

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

Fixed (except for mock classes not implementing all members)

@@ -8,7 +8,7 @@
*/
"insecure-random": true,
"no-banned-terms": true,
"no-cookies": true,
"no-cookies": false,
Copy link
Member Author

Choose a reason for hiding this comment

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

These have always been displayed as warning as not being supported with current typescript flags. Turning off enforcement to remove warnings.

@codecov
Copy link

codecov bot commented Nov 16, 2018

Codecov Report

Merging #199 into master will decrease coverage by 0.33%.
The diff coverage is 96.56%.

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
- Coverage   93.49%   93.15%   -0.34%     
==========================================
  Files          15       15              
  Lines        1444     1418      -26     
  Branches      244      246       +2     
==========================================
- Hits         1350     1321      -29     
- Misses         94       97       +3
Impacted Files Coverage Δ
packages/desktopjs/src/guid.ts 100% <ø> (ø)
packages/desktopjs/src/container.ts 93.84% <ø> (ø)
packages/desktopjs/src/propertymapping.ts 100% <ø> (ø)
packages/desktopjs/src/events.ts 100% <ø> (ø)
packages/desktopjs/src/notification.ts 100% <ø> (ø)
packages/desktopjs/src/tray.ts 100% <ø> (ø)
packages/desktopjs/src/menu.ts 100% <ø> (ø)
packages/desktopjs/src/ipc.ts 100% <ø> (ø)
packages/desktopjs/src/screen.ts 100% <ø> (ø)
packages/desktopjs/src/desktop.ts 100% <100%> (ø)
... and 9 more

@bingenito
Copy link
Member Author

Loss in coverage is from WIP xit tests for create window in electron/openfin packages.

@psmulovics
Copy link
Member

I'm OK to approve when the WIPs and the other few comments are handled 👍

@bingenito bingenito changed the title WIP BREAKING CHANGE: Lerna/monorepo refactor package split BREAKING CHANGE: Lerna/monorepo refactor package split Dec 3, 2018
@bingenito bingenito merged commit dcb250e into morganstanley:master Dec 3, 2018
@bingenito bingenito deleted the lerna branch May 28, 2021 13:36
@bingenito bingenito restored the lerna branch May 28, 2021 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants