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

refactor: modernize code and remove dependencies #260

Merged
merged 14 commits into from
Nov 17, 2023
Merged

Conversation

Uzlopak
Copy link
Collaborator

@Uzlopak Uzlopak commented Nov 17, 2023

This PR refactors the whole codebase. Removes unecessary deps, use of built in fetch.

Should be released as semver-major.

I was first confused, because it seemed, that it was bugged, because the payload of the endpoint was not returned. Then I tested it with the original smee-client and realized that it is a one way thing... smee.io does not return the answer of the webserver. Please correct me if I am wrong.

Coverage is improved significantly.

 % Coverage report from v8
----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------|---------|----------|---------|---------|-------------------
All files |   94.49 |    88.88 |   66.66 |   94.49 |                   
 index.ts |   94.49 |    88.88 |   66.66 |   94.49 | 80-81,85-86,89-90 
----------|---------|----------|---------|---------|-------------------

BREAKING CHANGE: drop support for Node <18

BREAKING CHANGE: use native fetch for requests

@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Nov 17, 2023

@gr2m
@wolfy1339

@Uzlopak Uzlopak mentioned this pull request Nov 17, 2023
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

What are the breaking changes? Drop support for Node < 18 and use of native fetch?

@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Nov 17, 2023

exactly

@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Nov 17, 2023

Can I get permissions please? I could then close some issues and pull requests, when this gets released.

@Uzlopak
Copy link
Collaborator Author

Uzlopak commented Nov 17, 2023

@gr2m
Thanks for the permissions

@gr2m gr2m changed the title Refactor refactor: modernize code and remove dependencies Nov 17, 2023
@gr2m gr2m merged commit da656a4 into probot:master Nov 17, 2023
1 check passed
@gr2m
Copy link
Contributor

gr2m commented Nov 17, 2023

we don't have an automated release setup yet, let me take care of this

Copy link

🎉 This PR is included in version 1.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gr2m
Copy link
Contributor

gr2m commented Nov 17, 2023

well ouch that should have been v2.0.0 not sure why it didn't recognize the

BREAKING CHANGE: drop support for Node <18

BREAKING CHANGE: use native fetch for requests

I'm looking into it

Copy link

🎉 This PR is included in version 1.2.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gr2m
Copy link
Contributor

gr2m commented Nov 17, 2023

lol now the revert failed to build: https://github.com/probot/smee-client/actions/runs/6909425601/job/18800742387 so I cannot release 1.2.5 🤷🏼

For now I've set 1.2.3 as latest on npm.

GitHub
🔴 Receives payloads then sends them to your local server - fix: Revert "refactor: modernize code and remove dependencies (#260)"… · f67f3c8

@gr2m
Copy link
Contributor

gr2m commented Nov 17, 2023

@Uzlopak do these type errors look familiar? Maybe they are easy to fix in the 1.x branch?

> tsc -p tsconfig.json

node_modules/@types/eventsource/dom-monkeypatch.d.ts:42:14 - error TS2717: Subsequent property declarations must have the same type.  Property 'AT_TARGET' must be of type 'number', but here has type '2'.

42     readonly AT_TARGET: 2;
                ~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:5221:14
    5221     readonly AT_TARGET: number;
                      ~~~~~~~~~
    'AT_TARGET' was also declared here.

node_modules/@types/eventsource/dom-monkeypatch.d.ts:43:14 - error TS2717: Subsequent property declarations must have the same type.  Property 'BUBBLING_PHASE' must be of type 'number', but here has type '3'.

43     readonly BUBBLING_PHASE: 3;
                ~~~~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:5222:14
    5222     readonly BUBBLING_PHASE: number;
                      ~~~~~~~~~~~~~~
    'BUBBLING_PHASE' was also declared here.

node_modules/@types/eventsource/dom-monkeypatch.d.ts:44:14 - error TS2717: Subsequent property declarations must have the same type.  Property 'CAPTURING_PHASE' must be of type 'number', but here has type '1'.

44     readonly CAPTURING_PHASE: 1;
                ~~~~~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:5223:14
    5223     readonly CAPTURING_PHASE: number;
                      ~~~~~~~~~~~~~~~
    'CAPTURING_PHASE' was also declared here.

node_modules/@types/eventsource/dom-monkeypatch.d.ts:45:14 - error TS2717: Subsequent property declarations must have the same type.  Property 'NONE' must be of type 'number', but here has type '0'.

45     readonly NONE: 0;
                ~~~~

  node_modules/typescript/lib/lib.dom.d.ts:5224:14
    5224     readonly NONE: number;
                      ~~~~
    'NONE' was also declared here.

@gr2m
Copy link
Contributor

gr2m commented Nov 17, 2023

I might have found a way

@gr2m
Copy link
Contributor

gr2m commented Nov 17, 2023

All set.

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.

3 participants