Skip to content

Commit

Permalink
Merge tag 'v4.1.3' of https://github.com/swagger-api/swagger-ui into …
Browse files Browse the repository at this point in the history
…outsystems

Jenkins Git plugin tagging with v4.1.3
  • Loading branch information
jbasants committed Jan 26, 2024
2 parents a39e110 + 86e7f00 commit b16b0dd
Show file tree
Hide file tree
Showing 114 changed files with 44,078 additions and 21,568 deletions.
35 changes: 21 additions & 14 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
commit-message:
prefix: "chore"
include: "scope"
open-pull-requests-limit: 6
ignore:
# node-fetch must be synced manually
- dependency-name: "node-fetch"
- dependency-name: "release-it"
- dependency-name: "@release-it/conventional-changelog"

- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
commit-message:
prefix: "chore"
include: "scope"
open-pull-requests-limit: 3
ignore:
# node-fetch must be synced manually
- dependency-name: "node-fetch"
- dependency-name: "release-it"
- dependency-name: "@release-it/conventional-changelog"

- package-ecosystem: "docker"
# Look for a `Dockerfile` in the `root` directory
directory: "/"
# Check for updates once a week
schedule:
interval: "weekly"

10 changes: 1 addition & 9 deletions .github/workflows/dependabot-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,9 @@ jobs:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: 'Wait for status checks'
id: waitforstatuschecks
uses: WyriHaximus/github-action-wait-for-status@v1
with:
ignoreActions: Merge me!
checkInterval: 180
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Merge me!
if: steps.waitforstatuschecks.outputs.status == 'success'
uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.SWAGGER_BOT_GITHUB_TOKEN }}
command: squash and merge
20 changes: 20 additions & 0 deletions .github/workflows/docker-image-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Security scan for docker image

on:
workflow_dispatch:
schedule:
- cron: '30 4 * * *'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/swaggerapi/swagger-ui:unstable'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
103 changes: 62 additions & 41 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,55 +9,76 @@ on:
pull_request:
branches: [ master ]

env:
CYPRESS_CACHE_FOLDER: cypress/cache

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.13.x, 10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Lint code for errors only
run: npm run lint-errors
- name: Run all tests
run: npm test
env:
CI: true
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Cache Cypress binary
id: cache-cypress-binary
uses: actions/cache@v2
with:
path: cypress/cache
key: cypress-binary-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: |
steps.cache-node-modules.outputs.cache-hit != 'true' ||
steps.cache-cypress-binary.outputs.cache-hit != 'true'
run: npm ci
- name: Lint code for errors only
run: npm run lint-errors
- name: Run all tests
run: npm run just-test-in-node && npm run test:unit-jest
env:
CI: true
- name: Build SwaggerUI
run: npm run build
- name: Test build artifacts
run: npm run test:artifact

artifact-bundle:
e2e-tests:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Build and Run all artifact tests
run: npm run test:artifact

release:
if: contains(github.ref, 'master')
runs-on: ubuntu-latest
needs: [build]
containers: ['+(a11y|security|bugs)/**/*.js', 'features/**/+(o|d)*.js', 'features/**/m*.js', 'features/**/!(o|d|m)*.js']

steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/checkout@v2
- name: Use Node.js 16.x
uses: actions/setup-node@v2
with:
node-version: 16
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Cache Cypress binary
id: cache-cypress-binary
uses: actions/cache@v2
with:
path: cypress/cache
key: cypress-binary-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: |
steps.cache-node-modules.outputs.cache-hit != 'true' ||
steps.cache-cypress-binary.outputs.cache-hit != 'true'
run: npm ci
- name: Cypress Test
run: npx start-server-and-test cy:start http://localhost:3204 'npm run cy:run -- --spec "test/e2e-cypress/tests/${{ matrix.containers }}"'
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint -e
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
6 changes: 0 additions & 6 deletions .huskyrc

This file was deleted.

1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*
*/
!README.md
!NOTICE
!package.json
!dist/swagger-ui.js
!dist/swagger-ui.js.map
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.8
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# We don't declare them here — take a look at our docs.
# https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md

FROM nginx:1.19-alpine
FROM nginx:1.21.4-alpine

RUN apk --no-cache add nodejs
RUN apk update && apk add --no-cache "nodejs>=14.17.6-r0"

LABEL maintainer="fehguy"

Expand Down
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -186,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 SmartBear Software Inc.
Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 2 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
swagger-ui
Copyright 2020-2021 SmartBear Software Inc.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The OpenAPI Specification has undergone 5 revisions since initial creation in 20

Swagger UI Version | Release Date | OpenAPI Spec compatibility | Notes
------------------ | ------------ | -------------------------- | -----
4.0.0 | 2021-11-03 | 2.0, 3.0 | [tag v4.0.0](https://github.com/swagger-api/swagger-ui/tree/v4.0.0)
3.18.3 | 2018-08-03 | 2.0, 3.0 | [tag v3.18.3](https://github.com/swagger-api/swagger-ui/tree/v3.18.3)
3.0.21 | 2017-07-26 | 2.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-ui/tree/v3.0.21)
2.2.10 | 2017-01-04 | 1.1, 1.2, 2.0 | [tag v2.2.10](https://github.com/swagger-api/swagger-ui/tree/v2.2.10)
Expand Down Expand Up @@ -88,4 +89,4 @@ To help with the migration, here are the currently known issues with 3.X. This l

## Security contact

Please disclose any security-related issues or vulnerabilities by emailing [[email protected]](mailto:[email protected]), instead of using the public issue tracker.
Please disclose any security-related issues or vulnerabilities by emailing [[email protected]](mailto:[email protected]), instead of using the public issue tracker.
7 changes: 0 additions & 7 deletions config/jest/jest.artifact-es-bundle-core.config.js

This file was deleted.

7 changes: 0 additions & 7 deletions config/jest/jest.artifact-es-bundle.config.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ const path = require('path');
module.exports = {
rootDir: path.join(__dirname, '..', '..'),
testEnvironment: 'jsdom',
testMatch: ['**/test/build-artifacts/umd.js'],
testMatch: ['**/test/build-artifacts/**/*.js'],
};
1 change: 1 addition & 0 deletions config/jest/jest.unit.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'<rootDir>/test/unit/components/online-validator-badge.jsx',
'<rootDir>/test/unit/components/live-response.jsx',
],
silent: true, // set to `false` to allow console.* calls to be printed
transformIgnorePatterns: [
'/node_modules/(?!(react-syntax-highlighter)/)'
]
Expand Down
2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

42 changes: 28 additions & 14 deletions dist/swagger-ui-bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,46 @@ object-assign
* Licensed under the MIT License.
*/

/*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */
/*! @license DOMPurify 2.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.3/LICENSE */

/*! https://mths.be/punycode v1.3.2 by @mathias */
/*! https://mths.be/punycode v1.4.1 by @mathias */

/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */

/** @license React v0.20.2
* scheduler.production.min.js
*
* Borrows from Modernizr.
* Copyright (c) Facebook, Inc. and its affiliates.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v16.8.6
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit b16b0dd

Please sign in to comment.