Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sandersn
Copy link
Contributor

@sandersn sandersn commented Jul 25, 2022

Typescript 4.8 assumes that unconstrained types extend unknown, not {} (which is unknown minus null and undefined). However, many uses still need to extend {}. This PR does that explicitly for knex types.

See https://devblogs.microsoft.com/typescript/announcing-typescript-4-8-beta/#unconstrained-generics-no-longer-assignable-to

Typescript 4.8 assumes that unconstrained types extend `unknown`, not `{}` (which is `unknown` minus `null` and `undefined`). However, many uses still need to extend `{}`. This PR does that explicitly for knex types.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.272% when pulling 74f5447 on sandersn:update-types-ts-4.8 into 72065c1 on knex:master.

@kibertoad kibertoad merged commit 658cde3 into knex:master Jul 30, 2022
@kibertoad
Copy link
Collaborator

Thanks!

@jamesone
Copy link

I can't see that this fix was released. Knex 2.2.0 was released on 19th Jul, whereas this PR was merged on the 31th of July. @kibertoad How do knex releases work?

Jkovarik added a commit to nasa/cumulus that referenced this pull request Aug 31, 2022
Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279
@kibertoad
Copy link
Collaborator

Released in 2.3.0

Jkovarik added a commit to nasa/cumulus that referenced this pull request Aug 31, 2022
…ng (#3095)

* Tightly constrain typescript verseion due to knex typing

Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279

* Add CHANGELOG 🔔

* Update generate-ts-build-cache to always 'npm install'

* Update CHANGELOG
npauzenga pushed a commit to nasa/cumulus that referenced this pull request Oct 5, 2022
…ng (#3095)

* Tightly constrain typescript verseion due to knex typing

Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279

* Add CHANGELOG 🔔

* Update generate-ts-build-cache to always 'npm install'

* Update CHANGELOG
charleshuang80 pushed a commit to nasa/cumulus that referenced this pull request Oct 6, 2022
…ng (#3095)

* Tightly constrain typescript verseion due to knex typing

Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279

* Add CHANGELOG 🔔

* Update generate-ts-build-cache to always 'npm install'

* Update CHANGELOG
charleshuang80 added a commit to nasa/cumulus that referenced this pull request Oct 10, 2022
* merge CUMULUS-2557

* merge CUMULUS-2971

* merge CUMULUS-3021

* merge CUMULUS-3024

* 12.0.3 version bump

* remove duplicate api user

* Sort results in unit test before comparison

* add ci stack

* CUMULUS-3027 -- Tightly constrain typescript version due to knex typing (#3095)

* Tightly constrain typescript verseion due to knex typing

Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279

* Add CHANGELOG 🔔

* Update generate-ts-build-cache to always 'npm install'

* Update CHANGELOG

* Update CNM lambdas to utilize newer releases (#3094)

Co-authored-by: Charles Huang <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>
Co-authored-by: Charles Huang <[email protected]>
jennyhliu added a commit to nasa/cumulus that referenced this pull request Oct 18, 2022
* Release 13.3.1 (#3106)

* merge CUMULUS-2557

* merge CUMULUS-2971

* CUMULUS-3021: Support Collections with a collection.version containing slashes (#3096)

* Support Collections with a collection.version containing slashes

* merge CUMULUS-3021

* merge CUMULUS-3024

* bump version to 13.3.1

* update documentation

* update changelog

* remove duplicate api user

* Sort results in unit test before comparison

Co-authored-by: Charles Huang <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>

* CUMULUS-3027 -- Tightly constrain typescript version due to knex typing (#3095)

* Tightly constrain typescript verseion due to knex typing

Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279

* Add CHANGELOG 🔔

* Update generate-ts-build-cache to always 'npm install'

* Update CHANGELOG

* Release 13.3.2 (#3117)

* Update CNM lambdas to utilize newer releases (#3094)

* 13.3.2 version bump

* update changelog

Co-authored-by: Jonathan Kovarik <[email protected]>

* update changelog

* re-add comma

Co-authored-by: Charles Huang <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>
npauzenga added a commit to nasa/cumulus that referenced this pull request Oct 27, 2022
* initial commit

* add postgres query to LIST endpoints

* add tests for granules and collections

* Release 13.3.x with master (#3121)

* Release 13.3.1 (#3106)

* merge CUMULUS-2557

* merge CUMULUS-2971

* CUMULUS-3021: Support Collections with a collection.version containing slashes (#3096)

* Support Collections with a collection.version containing slashes

* merge CUMULUS-3021

* merge CUMULUS-3024

* bump version to 13.3.1

* update documentation

* update changelog

* remove duplicate api user

* Sort results in unit test before comparison

Co-authored-by: Charles Huang <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>

* CUMULUS-3027 -- Tightly constrain typescript version due to knex typing (#3095)

* Tightly constrain typescript verseion due to knex typing

Unpinned dependency resulted in typescript 4.8 being installed,
however knex (all versions) has an outstanding bug:
knex/knex#5279

* Add CHANGELOG 🔔

* Update generate-ts-build-cache to always 'npm install'

* Update CHANGELOG

* Release 13.3.2 (#3117)

* Update CNM lambdas to utilize newer releases (#3094)

* 13.3.2 version bump

* update changelog

Co-authored-by: Jonathan Kovarik <[email protected]>

* update changelog

* re-add comma

Co-authored-by: Charles Huang <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>

* fix lint error

* CUMULUS-3104:Update async operation image Dockerfile (#3130)

* CUMULUS-3104:Update async operation image Dockerfile to use node:14.19.3-buster
Upgraded saml2-js 4.0.0, rewire to 6.0.0 to address security vulnerabilities

* add xmldom to audit allowlist

* update default async_operation_image

* update changelog skip-integration-tests

* CUMULUS-2944: granules/bulkDelete endpoint has PayloadTooLargeError for 4k granules (#3122)

* Update body parser configuration to increase limit

* Add unit test, update changelog

* Update unit test and fix lint

* Fix lint errors

* Fix lint error

* Relocate granulesList.js and update reference in unit test

* Update helper function to dynamically generate IDs and move to different file. Update unit test

* Fix lint errors

* Increase limit to match lambda limit

* CUMULUS-3102: Update broken link (#3125)

* Fix docs that has bad link

* Update url to reference markdown file directly

* CUMULUS-3104: Fixed TS compilation error caused by @aws-sdk/client-s3 upgrade (#3132)

* Fixed TS compilation error caused by @aws-sdk/client-s3 3.190->3.193 upgrade

* fix cumulus/package.json

* update lerna to fix security vulnerability

* fix lzards-api-client package

* temporarily skip deleteS3Objects test

* remove @Cumulus from root, skip test deleteObjects, add missing package

* fix ci post build failure

* put xmldom back to allow list

* add comments for skipped test

Co-authored-by: Charles Huang <[email protected]>
Co-authored-by: jennyhliu <[email protected]>
Co-authored-by: Jonathan Kovarik <[email protected]>
Co-authored-by: Jennifer Tran <[email protected]>
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.

4 participants