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

Create tests for hslayers-server and convert CommonJS files to ES syntax #4654

Merged
merged 12 commits into from
Feb 5, 2024

Conversation

jmacura
Copy link
Collaborator

@jmacura jmacura commented Jan 23, 2024

Description

Adding Mocha framework and Chai assertion library as new dependencies for the server.

Rewritten all CommonJS modules to ES modules with updated imports/exports.

Bumps minimum Node version to 16 due to "got"

Related issues or pull requests

closes #3816
closes #4651
fixes #4635
fixes #4650 via a cherry-picked commit from #4678
does not affect #3858 – albeit cors-anywhere last version was published 3 years ago, I haven't found any suitable alternative

Upgraded dependencies fix better-sqlite3 installation problems with node-gyp and glibc

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Dependency updates
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)
  • I am unsure (we'll look into it together)

Do you introduce a breaking change?

  • Yes, but only for hslayers-server
  • No
  • I am unsure (no worries, we'll find out)

Checklist

  • I understand and agree that the changes in this PR will be licensed under the [MIT License]
  • I have followed the guidelines for contributing
  • The proposed change fits to the content of the code of conduct
  • I have added or updated tests and documentation, and the test suite passes (run npm test locally)
  • I'm lost; why do I have to check so many boxes? Please help!

using Mocha framework and Chai expect

& refactor(server): Rewrite CommonJS to ES modules
@jmacura jmacura force-pushed the issue-4635/proxy-replace branch 2 times, most recently from 12c4cc3 to ba35e99 Compare January 30, 2024 23:58
@jmacura jmacura force-pushed the issue-4635/proxy-replace branch from 3cb8b90 to 78411fb Compare January 31, 2024 23:20
@jmacura
Copy link
Collaborator Author

jmacura commented Jan 31, 2024

TODO: Update github workflow to run test-server but only when files in projects/hslayers-server are changed

@jmacura jmacura added the server label Jan 31, 2024
FilipLeitner and others added 2 commits February 5, 2024 13:54
Until now, if there were multiple "?" in the URL and thus multiple search-params, only the first were taken.
With this commit, all search params are resent to the remote server
} catch (ex) {
res.writeHead(500, { 'Content-Type': 'text/plain' });
res.write('Invalid request');
res.write(ex);

Check warning

Code scanning / CodeQL

Information exposure through a stack trace Medium

This information exposed to the user depends on
stack trace information
.
@jmacura jmacura force-pushed the issue-4635/proxy-replace branch from 9692293 to cd398ac Compare February 5, 2024 13:31
Ignore hslayers-server changes with original workflow
@jmacura jmacura force-pushed the issue-4635/proxy-replace branch from cd398ac to 6c5d80c Compare February 5, 2024 13:44
@jmacura jmacura marked this pull request as ready for review February 5, 2024 13:46
@jmacura jmacura requested a review from FilipLeitner as a code owner February 5, 2024 13:46
@jmacura jmacura merged commit c34e262 into develop Feb 5, 2024
4 checks passed
@jmacura jmacura deleted the issue-4635/proxy-replace branch February 9, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants