Skip to content

Commit

Permalink
fix(deps): upgrade http-spec and lodash (stoplightio#2516)
Browse files Browse the repository at this point in the history
* fix(deps): upgrade http-spec and lodash

* chore(release): publish

 - @stoplight/[email protected]
 - @stoplight/[email protected]
 - @stoplight/[email protected]

* fix: ^ to ~ for elements-core

* fix(tests): fix up tryit test
  • Loading branch information
Daniel A. White authored and AhalyaPai committed Feb 18, 2025
1 parent 097c2e9 commit e82997c
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 17 deletions.
26 changes: 23 additions & 3 deletions cypress/integration/stoplight-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,31 @@ describe('Stoplight component', () => {
});

it('invokes TryIt request', () => {
loadCreateTodoPage();
loadListTodosPage();

cy.intercept(
{
method: 'GET',
hostname: 'todos.stoplight.io',
pathname: '/**',
https: true,
},
{
statusCode: 200,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': 'content-type',
'Content-Type': 'application/json',
},
body: '"hello world"',
},
).as('todos-api');

cy.findByRole('button', { name: /send api request/i }).click();

// Temporarily changing response code as the requested api is unavailable
cy.findByText('500 Internal Server Error').should('exist');
cy.waitFor('@todos-api');

cy.findByText('hello world').should('exist');
});

it('mocks response correctly', () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/elements-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
]
},
"dependencies": {
"@stoplight/http-spec": "^7.0.1",
"@stoplight/http-spec": "^7.0.2",
"@stoplight/json": "^3.18.1",
"@stoplight/json-schema-ref-parser": "^9.0.5",
"@stoplight/json-schema-sampler": "0.2.3",
Expand All @@ -75,7 +75,7 @@
"httpsnippet-lite": "^3.0.5",
"jotai": "1.3.9",
"json-schema": "^0.4.0",
"lodash": "^4.17.19",
"lodash": "^4.17.21",
"nanoid": "^3.1.32",
"prop-types": "^15.7.2",
"react-query": "^3.34.19",
Expand All @@ -98,7 +98,7 @@
"@types/enzyme": "3.x.x",
"@types/enzyme-adapter-react-16": "1.x.x",
"@types/json-schema": "^7.0.11",
"@types/lodash": "^4.14.181",
"@types/lodash": "^4.14.202",
"@types/prop-types": "^15.7.5",
"@types/react": "16.9.56",
"@types/react-dom": "16.9.12",
Expand Down
4 changes: 2 additions & 2 deletions packages/elements-dev-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@stoplight/path": "^1.3.2",
"@stoplight/types": "^14.0.0",
"classnames": "^2.2.6",
"lodash": "^4.17.19",
"lodash": "^4.17.21",
"react-query": "^3.34.19",
"react-router-dom": "^5.2.0",
"use-debounce": "^6.0.1"
Expand All @@ -83,7 +83,7 @@
"@testing-library/react": "^11.1.1",
"@testing-library/react-hooks": "^3.4.2",
"@testing-library/user-event": "^12.2.0",
"@types/lodash": "^4.14.181",
"@types/lodash": "4.14.202",
"@types/react": "16.9.56",
"@types/react-dom": "16.9.12",
"@types/react-router-dom": "^5.3.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
},
"dependencies": {
"@jpmorganchase/elemental-core": "^1.16.0",
"@stoplight/http-spec": "^7.0.1",
"@stoplight/http-spec": "^7.0.2",
"@stoplight/json": "^3.18.1",
"@stoplight/mosaic": "^1.53.4",
"@stoplight/types": "^14.1.1",
"@stoplight/yaml": "^4.2.3",
"classnames": "^2.2.6",
"file-saver": "^2.0.5",
"lodash": "^4.17.19",
"lodash": "^4.17.21",
"react-query": "^3.34.19",
"react-router-dom": "^5.2.0"
},
Expand Down
17 changes: 10 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4044,10 +4044,10 @@
tslib "^2.6.2"
type-is "^1.6.18"

"@stoplight/http-spec@^7.0.1":
version "7.0.1"
resolved "https://registry.yarnpkg.com/@stoplight/http-spec/-/http-spec-7.0.1.tgz#6802f3e426940e02d88126fc486237e73541ee81"
integrity sha512-9O34o331tDMwHEHEc0N5Mh39cvVtioono46SyMy/BWQwAhuVyVfzHZxlBHepe0grIDcTrJxsb8iARGi86luwoQ==
"@stoplight/http-spec@^7.0.2":
version "7.0.2"
resolved "https://registry.yarnpkg.com/@stoplight/http-spec/-/http-spec-7.0.2.tgz#010f10d1f721b0f6265ae3a851d0f41f62df0875"
integrity sha512-4DvT0w5goAhLxVbHfdzkMqGcTdi9bU4LmBrYNrZBOCFV4JPAHRERSBdI7F7n/MfgVvzxWb3Vftrh6pCgTd/+Jg==
dependencies:
"@stoplight/json" "^3.18.1"
"@stoplight/json-schema-generator" "1.0.2"
Expand All @@ -4056,9 +4056,7 @@
"@types/swagger-schema-official" "~2.0.22"
"@types/type-is" "^1.6.3"
fnv-plus "^1.3.1"
lodash.isequalwith "^4.4.0"
lodash.pick "^4.4.0"
lodash.pickby "^4.6.0"
lodash "^4.17.21"
openapi3-ts "^2.0.2"
postman-collection "^4.1.2"
tslib "^2.6.2"
Expand Down Expand Up @@ -5749,6 +5747,11 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=

"@types/[email protected]", "@types/lodash@^4.14.202":
version "4.14.202"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8"
integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ==

"@types/lodash@^4.14.167", "@types/lodash@^4.14.181":
version "4.14.185"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.185.tgz#c9843f5a40703a8f5edfd53358a58ae729816908"
Expand Down

0 comments on commit e82997c

Please sign in to comment.