-
Notifications
You must be signed in to change notification settings - Fork 4
fix: Simplify js and css value validation #70
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
# [5.0.0-next.2](v5.0.0-next.1...v5.0.0-next.2) (2020-07-15) ### Bug Fixes * Simplify js and css value validation ([#70](#70)) ([05a1ffc](05a1ffc))
🎉 This PR is included in version 5.0.0-next.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [5.0.0](v4.5.1...v5.0.0) (2023-11-28) ### Bug Fixes * Improve ESM exports to account for dual module exports ([#123](#123)) ([42ebb4f](42ebb4f)) * Point require export to main.js ([#122](#122)) ([1438ee6](1438ee6)) * Remove original url module ([#185](#185)) ([6c01c0f](6c01c0f)) * Simplify js and css value validation ([#70](#70)) ([05a1ffc](05a1ffc)) ### Features * Convert to ESM ([#119](#119)) ([349c5b9](349c5b9)) * Drop node 10.x support ([#67](#67)) ([84203f8](84203f8)) * Remove CJS build step ([#170](#170)) ([15390ed](15390ed)) * Use ES private properties instead of Symbols for privacy ([#72](#72)) ([4083fa1](4083fa1)) ### BREAKING CHANGES * Convert from CommonJS to ESM * feat: convert to ESM * fix: Remove outcommented code * ci: Add build step for backward compat to CJS * ci: Ignore linting dist directory Co-authored-by: Trygve Lie <trygve.lie@finn.no> * Due to dropping node 10.x support we use ES private properties instead of Symbols. We've been using Symbols to define private properties in classes up until now. This has the downside that they are not true private and in later versions of node.js one would see these Symbols when inspecting an object. What we want is proper private properties. This PR does also add a pretty printer which outputs an object literal or the object so when debugging one can see the getters and setters of the object. Example: printing a object with `console.log()` would previously print the following: ```sh PodiumHttpIncoming { [Symbol(podium:httpincoming:development)]: false, [Symbol(podium:httpincoming:response)]: {}, [Symbol(podium:httpincoming:request)]: {}, [Symbol(podium:httpincoming:context)]: {}, [Symbol(podium:httpincoming:params)]: {}, [Symbol(podium:httpincoming:proxy)]: false, [Symbol(podium:httpincoming:name)]: '', [Symbol(podium:httpincoming:view)]: {}, [Symbol(podium:httpincoming:url)]: {}, [Symbol(podium:httpincoming:css)]: [], [Symbol(podium:httpincoming:js)]: [] } ``` Now the following will be printed: ```sh { development: false, response: {}, request: {}, context: {}, params: {}, proxy: false, name: '', view: {}, url: {}, css: [], js: [] } ``` Co-authored-by: Trygve Lie <trygve.lie@finn.no> * Only support node 12 and 14. Co-authored-by: Trygve Lie <trygve.lie@finn.no>
🎉 This PR is included in version 5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
It does not really make any sense using the json schema to validate the
value
argument of a JS and CSS object. The schema is intended to validate the whole object and not just one single value. Due to this the validation of thevalue
argument of a JS and CSS object is simplified.The schema is updated to use version 5.0.0-next.1 and tests to validate a JS and CSS object with the schema is added.