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

[APP-14984] - Fix resolvedSchemas.json adding required fields #196

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

geovannimp
Copy link
Contributor

No description provided.

@geovannimp geovannimp requested a review from a team as a code owner April 3, 2024 20:00
Copy link

socket-security bot commented Apr 3, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/[email protected] environment +1 29.8 kB nicolo-ribaudo
npm/@babel/[email protected] environment, filesystem, unsafe Transitive: shell +29 5.47 MB nicolo-ribaudo
npm/@babel/[email protected] None +3 624 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 49.1 kB nicolo-ribaudo
npm/@babel/[email protected] environment +8 124 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 1.88 MB nicolo-ribaudo
npm/@babel/[email protected] None 0 68.9 kB nicolo-ribaudo
npm/@babel/[email protected] environment +2 2.45 MB nicolo-ribaudo
npm/@eslint-community/[email protected] None 0 379 kB eslint-community-bot
npm/@eslint-community/[email protected] None 0 431 kB eslint-community-bot
npm/@jridgewell/[email protected] None 0 53.2 kB jridgewell
npm/@jridgewell/[email protected] None 0 45.9 kB jridgewell
npm/@jridgewell/[email protected] None 0 169 kB jridgewell
npm/@nodelib/[email protected] filesystem +2 37.1 kB mrmlnc
npm/@nodelib/[email protected] filesystem 0 11.8 kB mrmlnc
npm/@nodelib/[email protected] None +2 69.5 kB mrmlnc
npm/@types/[email protected] None 0 78.7 kB types
npm/@types/[email protected] None +1 2.04 MB types
npm/@typescript-eslint/[email protected] Transitive: environment, filesystem +21 6.77 MB jameshenry
npm/@typescript-eslint/[email protected] Transitive: environment, filesystem +15 2.8 MB jameshenry
npm/[email protected] None 0 531 kB marijn
npm/[email protected] environment +1 49.2 kB qix
npm/[email protected] None 0 20.8 kB lydell
npm/[email protected] None 0 32.3 kB eslintbot
npm/[email protected] environment, filesystem Transitive: eval, unsafe +51 8.68 MB eslintbot
npm/[email protected] None +1 98 kB eslintbot
npm/[email protected] Transitive: environment, filesystem, unsafe +18 973 kB simenb
npm/[email protected] None 0 51.5 kB kael
npm/[email protected] None +1 19.8 kB phated
npm/[email protected] environment Transitive: filesystem +9 663 kB simenb
npm/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +174 6.31 MB simenb
npm/[email protected] None +1 146 kB jonschlinkert
npm/[email protected] None +1 13.8 kB sindresorhus
npm/[email protected] environment, filesystem, unsafe 0 8.39 MB prettier-bot
npm/[email protected] Transitive: environment +4 546 kB simenb
npm/[email protected] None +2 125 kB npm-cli-ops
npm/[email protected] None 0 9.96 kB isaacs
npm/[email protected] None 0 4.03 kB sindresorhus
npm/[email protected] environment, filesystem, unsafe Transitive: eval, network, shell +70 2.91 MB kul
npm/[email protected] environment, filesystem, unsafe +12 1.39 MB blakeembrey
npm/[email protected] None 0 66.8 MB typescript-bot
npm/[email protected] environment, filesystem 0 128 kB oss-bot

🚮 Removed packages: npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@nodelib/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@typescript-eslint/[email protected], npm/@typescript-eslint/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

Copy link
Contributor

@eyadmba eyadmba left a comment

Choose a reason for hiding this comment

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

Appreciate the refactor to .ts

tools/generate-schema-imports.sh Show resolved Hide resolved

for SCHEMA_FILENAME in $(ls src/schemas | sort); do
SCHEMA=$(echo $SCHEMA_FILENAME | cut -d . -f 1)
sed -i "" "\|$MARKER|a\\
sed -i"" "\|$MARKER|a\\
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sed -i"" "\|$MARKER|a\\
sed -i "" "\|$MARKER|a\\

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a fix to make it work equal on linux and macos. The previous code just worked on mac.

}
/**
* sortObject sorts an objects and returns an object with keys in alphabetical
* order
* @param { Object } obj
* @returns an object with the keys in sorted alphabetical order
*/
function sortObject(obj) {
function sortObject<T extends Record<string, unknown>>(obj: T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be generic?

Would this not work?

Suggested change
function sortObject<T extends Record<string, unknown>>(obj: T) {
function sortObject(obj: Record<string, unknown>) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The type need to be generic so the type returned is the same type passed to the function. In your suggestion the returned type will be Record<string, unknown>.

@@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [14.x]
node-version: [18.x]
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@geovannimp geovannimp merged commit 42896c0 into main Apr 9, 2024
10 checks passed
@geovannimp geovannimp deleted the APP-14984 branch April 9, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants