-
Notifications
You must be signed in to change notification settings - Fork 9
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
[META] fork / upstream maintenance discussion #3
Comments
All tests are passing now, the node version on git workflow was updated to v14.15.5
|
Should open a PR for merging #194 |
The pull request creation UI should allow creating a pull request from any branch to any branch. Once I pick the correct forks and branches in the dropdowns, it appears to show me the correct commits. |
I created PR #5 for this. |
@cspotcode awesome! thanks I'll try doing that myself with another PR |
Ported a feature PR #140 mock free functions |
Ported #139 Matcher types |
I noticed that the johanblumenberg README has a list of features it adds which are not in the upstream library: Maybe we can try to port all of those features. |
I sent a support ticket to npm support requesting a transfer of the @TypeStrong scope. If we want, and if they approve the transfer, we can publish ts-mockito under the @typestrong/ts-mockito scope. |
@cspotcode I know I already opened PR's for porting features from @johanblumenberg but come to think of it after reading the latest comments on the maintenance thread I realized that maybe it would be better to resolve un-addressed "pains" - issues first and have a clear agenda of how it would be maintained outside of the original repo in case the author wouldn't intend to merge the fork into the original repo, I understand that most of the participants of the thread would like to see the original repo maintained but I have a lack of faith in personal repos in situation like those and IMO a heavily used project should have a community with a clear code of conduct, agenda, skilled developers willing to contribute - saying this carefully, as I do respect the work that was done by the author and others, I just feel the thread is moving in circles.. |
I like moving to TypeStrong. Github will let me transfer this repository to TypeStrong today. Is there more to discuss, or are we ready to do that right now? |
@cspotcode Let's rock \m/ |
Transfer complete. You should still have full access. If the permissions got dropped for some reason, let me know and I'll be sure to fix it. |
@cspotcode cool I see I have access, I'll try to find the time to replace tslint in eslint after my working hours and maybe go over the issues see if there's some bugs that still happen that can be resolved. LMK when you'll publish to npm, worth adding a badge to the readme. |
@LironHazan where do you want to publish in the short-term? Ideally, we publish to npm
I am still waiting to hear from npm support about the @TypeStrong scope. I am also not sure if organizations have granular permissions. We would want to be sure ts-mockito maintainers have access to publish @typestrong/ts-mockito, but not to publish unrelated typestrong packages with different maintainership teams. I have successfully reserved the |
so if it won't be easy/possible to publish into @typestrong/ts-mockito we can go with @ts-mockito/ts-mockito IMO @cspotcode |
I did some more googling and finally found what I was looking for. |
I did not receive a response from npm for my initial support request; I've sent another. I've included a copy below. If you would prefer to move ahead publishing to @ts-mockito/ts-mockito, I can invite you to the organization on npm. This will grant you permission to publish.
|
We can use @ts-mockito/ts-mockito I don't mind, |
I would avoid making any changes that are likely to cause merge conflicts
with code or pull requests already written for either of the other 2
ts-mockito repositories. Better to be able to cleanly merge pre-existing
features and bugfixes.
Why is your npm username? I'll add it to the organization.
…On Sat, Oct 9, 2021, 7:44 AM LironH ***@***.***> wrote:
We can use @ts-mockito/ts-mockito I don't mind,
bTW I started to gradually configure eslint, the default linter is still
tslint but if you'll configure your code-editor to detect the eslint config
you'll start getting errors,
running eslint will produce: 422 problems (357 errors, 65 warnings) most
of them are of:
no-unsafe-assignment
no-unsafe-return
no-unsafe-call
no-unsafe-member-access
As a result of a massive use of any everywhere LOL, honestly I'm not sure
if I'll keep fixing types, won't worth the effort..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC35OHZDROOCLAJ5FHQM2LUGATKHANCNFSM5D3ECXSQ>
.
|
@cspotcode lironhazan thanks |
How do you want to handle changelogs? I don't have a strong opinion. For ts-node we use Github Releases, (example) and I've recently started adding issues and pull requests to "milestones" to help me create the release notes. |
I don't mind using Github Releases, I've never really managed any changelogs before, I've noticed that some projects uses a CHANGELOG.md but I can't tell what's better |
Let's use Github Releases since NagRock already does: https://github.com/NagRock/ts-mockito/releases The big things that I personally try to avoid are:
Both Github Releases and CHANGELOG.md let us make corrections and amendments to the changelog at any time, which is a good thing. |
I created #11 which renames from @cspotcode to @ts-mockito so that we can publish to npm. I also created #12 where we should audit every upstream commit that does not exist in this fork. If there is anything important that we missed, we should find a way to get it merged into this fork. |
12 is great I see there're conflicts, I'll review when possible |
It took a little while, but npm transferred the @TypeStrong scope to me. I'm on vacation this weekend, but I can publish an initial release of @typestrong/ts-mockito when I'm back. |
@cspotcode Do you have still plan to release this to npm? Or is there another way I can consume it? The original ts-mockito stopped working with Typescript 4.4.2 and I'd like to see if your fork resolves the issue at all. FYI the issue seems to be that I created a test repo here EDIT: Also seems to occur for spying on components. e.g. // somecomponent.component.ts
// somecomponent.component.spec.ts
|
@pauleustice Here's an example of instantiation without the TestBed, the mocked instances are directly injected, describe(' test query editor', () => {
let component: QueryEditorComponent;
const mockedFeaturesFlagService = mock(FeatureFlagsService);
const mockedS1qlLangService = mock(S1qlLangService);
const mockedPQLLangService = mock(PowerQueryLangService);
const mockedQueryEditorService = mock(QueryEditorService);
const mockedCdr = mock(ChangeDetectorRef);
beforeEach(() => {
component = new QueryEditorComponent(
instance(mockedS1qlLangService),
instance(mockedPQLLangService),
instance(mockedQueryEditorService),
instance(mockedFeaturesFlagService),
instance(mockedCdr)
);
});
it('should emit validation state when invoking updateValidationState', () => {
jest.spyOn(component.validationState, 'emit');
component.updateValidationState(true);
expect(component.validationState.emit).toHaveBeenCalledTimes(1);
expect(component.validationState.emit).toHaveBeenCalledWith({ isValid: true });
}); I guess @cspotcode didn't publish to npm yet |
@LironHazan Thanks for both your replies :) I looked at replacing the ts-mockito
e.g. ts-mockito:
jest:
In Jest, you can't tell that foo was passed three times, just that it was passed and the method was called (with potentially anything) three times. It's a small distinction, but something we use a lot in our test suites. |
@pauleustice I see..
If you'll have a working local fix you can open a PR to this repo and I'll merge it, |
Yeah, I can publish this weekend. Is the current state of the code good for publication, and what should the version number be? |
@cspotcode I see we're 8 commit behind, I'll try to update this PR --> #12 first, |
@cspotcode I updated the branch, now we're ahead of the origin repo, all local tests passed so I merged |
Upgraded TS and karma --> #14 |
Thanks both. Yep, a schematic of some sort to transform the occurrences is probably the next bet. Thanks for the heads up on patch-package, hadn't heard of that before. Unfortunately I'm not familiar enough with ts-mockito yet to understand the problem. I did create this test repo which demonstrates the problem though. It occurs with TS >4.3.5. If you're able to publish this fork as a package I will see if it solves the issue :) |
@pauleustice Unfortunately the typescript upgrade didn't help, I just tested locally with your repo :/
The stacktrace won't imply of any ts-mockito source, can we isolate the Angular related abstractions (zone and jasmine wrappers) and make a simple typescript test with a combineLatest? |
@LironHazan Yep, I can try that. I'll have a go now. FYI, I previously added logging into ts-mockito's |
@LironHazan I've just pushed that to master on the test repo; basically removed TestBed, and changed the Angular service to a basic class. The tests still error. Should I create a separate issue for this, since it seems we've established that there is an issue? |
@pauleustice Umm maybe it's better to have a separated issue for continuing this discussion,
I'll try to isolate it from nx/angular and run on a plain typescript project - will ping soon |
@LironHazan Oops, my bad. I forgot to remove the I'm having a look now (by creating a blank Typescript-only project in the workspace), but currently getting lots of failures... |
@pauleustice Now I'm getting the jest runner (jest-circus) trace and still no mention to lead to the ts-mockito source, |
@LironHazan You wouldn't expect to see ts-mockito in the stack trace though, would you? (Since it isn't that that's erroring). It's just mocking class fields that it shouldn't (I believe) when running Do you want to raise a PR against my test repo and I can have a look when I get a chance? I have to leave my computer now unfortunately but will continue later on this evening or tomorrow morning. |
@pauleustice I wouldn't expect to see ts-mockito errors but I wanted to be sure that it's not, Thinking out load: TypeError: service.combinedProviderObservable$.subscribe is not a function I've printed the service for 4.4.x and got: And for 4.3.x we get:
When removing the use of spy it works in 4.4.x, I'll open a dedicated issue |
Published to npm, as @typestrong/ts-mockito v2.6.2, because upstream ts-mockito had already published a 2.6.1, so that git tag was already taken. https://www.npmjs.com/package/@typestrong/ts-mockito @LironHazan has also been given access to publish new versions. |
In NagRock/issues/212
There is discussion about adding maintainers to the original
ts-mockito
project.I still hope the author, NagRock, is able to add maintainers. Barring that, we may want to collaborate on this fork: https://npmjs.com/package/@johanblumenberg/ts-mockito
I also have access to the
@TypeStrong
org, and we can consider moving the project there.Other links:
This fork needs passing tests, being discussed in #2
The text was updated successfully, but these errors were encountered: