stoplightio / http-spec

Utilities to normalize OpenAPI v2 and v3 objects for the Stoplight ecosystem.
https://stoplight.io
Apache License 2.0
20 stars 11 forks source link

update dependencies and add prebuild script #184

Closed strmer15 closed 2 years ago

strmer15 commented 2 years ago

Motivation and Context

This change updates all the dependencies to their latest versions and regenerates the yarn.lock file, so that this library has the most up-to-date bug fixes and security patches from both its direct dependencies and its transitive ones. I was motivated to do this when working on the changes for https://github.com/stoplightio/http-spec/pull/183.

Description

I went through each version in package.json and updated them to the latest then deleted and recreated the yarn.lock file to re-resolve transitive dependencies. I also added in rimraf and a prebuild script to clean the dist directory before building. Lastly, I removed the ts-node dev dependency since it doesn't seem to be directly used by this library.

One test required some changes - the global.location type seems to have been updated in the latest Typescript, so it can't be set directly without including all other properties of it (not just href), so I added a spread to make the compiler happy. The delete keyword wouldn't let me get by, however, so I added a @ts-ignore to it (but I'm not sure if it really needs to be there, the tests pass just fine without it).

How Has This Been Tested?

Ran yarn install, yarn build, and yarn test and ensured all the tests passed.

Types of changes

Checklist

marbemac commented 2 years ago

Thanks for your contribution @strmer15!

stoplight-bot commented 2 years ago

:tada: This PR is included in version 5.1.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

strmer15 commented 2 years ago

Thanks for your contribution @strmer15!

You're welcome, glad to help!