-
Notifications
You must be signed in to change notification settings - Fork 35
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
new release #66
Closed
Closed
new release #66
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- remove redundant information - add development setup instructions
extends Ors child classes
replace var declaration with const and let
create OrsBase class
previously the API key needed to be placed in multiple places for examples to work. It now only needs to be provided once during the environment setup by running the setup.sh script. - add setup.sh which generates a js api key module and an env file in preparation for further Dev APP - use API key in example html files - add generated files to .gitignore
using browserify and babel directly to bundle is complex and not a modern way to build and bundle libraries. Moving to vite as bundler instead, which has integrated support for building libraries and is future-proof. vue-cli was used to build the base structure for the project. - use module repository type - expose as cjs umd and es module - main ors-js-client.js now needs to be included with type module - remove babel & browserify dependencies and npm scripts - update eslint & move to eslintrc.cjs - add lint npm script - adjust README.md examples - other small README.md fixes
as prettier does not keep indentations properly and does not work well with eslint combined, it was removed. removes: - dependencies - prettierrc - prettier disables in src files
during development currently the package has to be rebuild before changes are reflected in the examples. To have a faster development feedback a minimal app template was added, which can be served by running 'vite' or 'npm run dev' from the command line. This enables consistent use of breakpoints from both within the browser or your IDE and serves as Test for the es module format.
to syncronize testing frameworks with the ors-map-client repo, we use the modern cypress framework for both unit- and component tests. - move from spec/ to src/__tests__ folder - add tests for dev_app component & simple e2e test in cypress/e2e - temporarily disables coverage functionality - restructure .gitignore - change test section in README.md squash terser
some common structural declarations were missing in html files fixed: - missing lang attribute for html tag - missing '<!DOCTYPE html>' Sonarcloud treats html tags without lang as a bug
a dedicated block for checking errors is not needed, as the test framework reports thrown errors that are not caught already.
- only run on pull requests - adjust to cypress tests by using fitting container and action - disable cypress video output generation
Feature/dev environment
added checkHeaders() and createRequest() which are called in all child classes to remove duplicate code
adjust tests to reflect changes
refactor this.meta to this.argsCache and prepareMeta() to saveArgsToCache() for more intuitive reading refactor copyProperties() to fillArgs(), amend the function to return requestArgs after gaps are filled by defaultArgs remove clear() from Geocode tests
move method to remove double slashes before host part is added to url variable
- function initiates with creation of class - adjust default services in child classes to also initiate with creation of class
calculate is now called from the OrsBase class
url variable is now defined within createRequest instead of OrsElevation.js and OrsPois.js
tests request arguments are correctly adjusted for multiple requests
.js ending for import statements of Ors classes and constants is required for tests to work
Class refactoring
with the new vite build process, derequire isn't used anymore
- remove unused constants
promise functions are awaited
refactor all functions using createRequest() to be async functions makes handing over resolve, reject as parameters unneccessary
if createRequest returns an error it is written into response
solves #64 - fetch() only rejects for network errors - other errors need to be thrown manually by checking response.ok
functions like clear(), addWaypoints() are no longer necessary
EmmaHegarty
added
enhancement
New feature or request
dependencies
Pull requests that update a dependency file
labels
Mar 20, 2023
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
You have successfully added a new SonarCloud configuration ``. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab. |
This was
linked to
issues
Mar 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
decreases duplicate code
adds developement Vue app
introduces cypress for code testing
adds code coverage
removes dependencies on bluebird and superagent (see #61 and #64)
removes unused clear() functions