Skip to content

Commit

Permalink
Merge branch 'master' into feature/fix-sonarqube-query
Browse files Browse the repository at this point in the history
  • Loading branch information
repo-ranger[bot] authored Jul 25, 2021
2 parents 2e98a94 + 6bd739a commit 569c92c
Show file tree
Hide file tree
Showing 1,151 changed files with 8,587 additions and 11,452 deletions.
34 changes: 17 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ package_steps: &package_steps
set +e
export NVM_DIR="/opt/circleci/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install v12
nvm use v12
nvm install v14
nvm use v14
npm install -g npm
# Run the package tests on each currently supported node version. See:
Expand Down Expand Up @@ -137,33 +137,33 @@ package_steps: &package_steps
jobs:
main:
docker:
- image: circleci/node:12
- image: circleci/node:14

<<: *main_steps

main@node-14:
main@node-16:
docker:
- image: circleci/node:14
- image: circleci/node:16

<<: *main_steps

integration:
docker:
- image: circleci/node:12
- image: circleci/node:14
- image: redis

<<: *integration_steps

integration@node-14:
integration@node-16:
docker:
- image: circleci/node:14
- image: circleci/node:16
- image: redis

<<: *integration_steps

danger:
docker:
- image: circleci/node:12
- image: circleci/node:14
steps:
- checkout

Expand All @@ -183,7 +183,7 @@ jobs:

frontend:
docker:
- image: circleci/node:12
- image: circleci/node:14
steps:
- checkout

Expand Down Expand Up @@ -224,19 +224,19 @@ jobs:

services:
docker:
- image: circleci/node:12
- image: circleci/node:14

<<: *services_steps

services@node-14:
services@node-16:
docker:
- image: circleci/node:14
- image: circleci/node:16

<<: *services_steps

e2e:
docker:
- image: cypress/base:12
- image: cypress/base:14.16.0
steps:
- checkout

Expand Down Expand Up @@ -285,11 +285,11 @@ workflows:
filters:
branches:
ignore: gh-pages
- main@node-14:
- main@node-16:
filters:
branches:
ignore: gh-pages
- integration@node-14:
- integration@node-16:
filters:
branches:
ignore: gh-pages
Expand All @@ -307,7 +307,7 @@ workflows:
ignore:
- master
- gh-pages
- services@node-14:
- services@node-16:
filters:
branches:
ignore:
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
/build
/coverage
/__snapshots__
/public
public
badge-maker/node_modules/
!.github/
1 change: 0 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ rules:
# Shields additions.
no-var: 'error'
prefer-const: 'error'
strict: 'error'
arrow-body-style: ['error', 'as-needed']
no-extension-in-require/main: 'error'
object-shorthand: ['error', 'properties']
Expand Down
29 changes: 0 additions & 29 deletions .github/ISSUE_TEMPLATE/1_Bug_report.md

This file was deleted.

44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/1_Bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: '🐛 Bug Report'
description: Report errors and problems
labels: [question]
body:
- type: dropdown
id: product
attributes:
label: Are you experiencing an issue with...
options:
- shields.io
- My own instance of shields
- badge-maker NPM package
validations:
required: true

- type: textarea
id: description
attributes:
label: '🐞 Description'
description: A clear and concise description of the problem.
validations:
required: true

- type: textarea
id: link
attributes:
label: '🔗 Link to the badge'
description: If you are reporting a problem with a specific badge on shields.io, provide a link to a badge demonstrating the error
validations:
required: false

- type: textarea
id: possible-solution
attributes:
label: '💡 Possible Solution'
description: 'Optional: only if you have suggestions on a fix/reason for the bug'
validations:
required: false

- type: markdown
attributes:
value: |
## :heart: Love Shields?
Please consider donating $10 to sustain our activities: [https://opencollective.com/shields](https://opencollective.com/shields)
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ service-definitions.yml
!/config/local*.template.yml

# Gatsby
/.cache
/frontend/.cache
/frontend/public
/public

# Cypress
Expand Down
1 change: 0 additions & 1 deletion .mocharc-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ require:
- '@babel/polyfill'
- '@babel/register'
- mocha-yaml-loader
- frontend/mocha-ignore-pngs
3 changes: 2 additions & 1 deletion .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"scripts",
"coverage",
"build",
".github"
".github",
"**/public/"
]
}
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package.json
package-lock.json
/__snapshots__
/.next
/.cache
.cache
/api-docs
/build
/public
public
/coverage
private/*.json
/.nyc_output
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ Note: this changelog is for the shields.io server. The changelog for the badge-m

---

## server-2021-07-01

- improve [MavenCentral], [MavenMetadata], and [GradlePluginPortal] [#6628](https://github.com/badges/shields/issues/6628)
- fix: fix regex to match [codecov]'s flags [#6655](https://github.com/badges/shields/issues/6655)
- fix usage style [#6638](https://github.com/badges/shields/issues/6638)
- update simple-icons to v5 with by-name lookup backwards compatibility [#6591](https://github.com/badges/shields/issues/6591)
- [GradlePluginPortal] add gradle plugin portal [#6449](https://github.com/badges/shields/issues/6449)
- upgrade some vulnerable packages [#6569](https://github.com/badges/shields/issues/6569)
- increase max-age for download and social badges [#6567](https://github.com/badges/shields/issues/6567)
- Dependency updates

## server-2021-06-01

- Changed creating badges to open a new Window/Tab [#6536](https://github.com/badges/shields/issues/6536)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:12-alpine
FROM node:14-alpine

RUN mkdir -p /usr/src/app
RUN mkdir /usr/src/app/private
Expand Down
41 changes: 24 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ You can read a [tutorial on how to add a badge][tutorial].
[![GitHub issues by-label](https://img.shields.io/github/issues/badges/shields/good%20first%20issue)](https://github.com/badges/shields/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)

[service-tests]: https://github.com/badges/shields/blob/master/doc/service-tests.md
[tutorial]: doc/TUTORIAL.md
[contributing]: CONTRIBUTING.md
[tutorial]: https://github.com/badges/shields/blob/master/doc/TUTORIAL.md
[contributing]: https://github.com/badges/shields/blob/master/CONTRIBUTING.md

## Development

1. Install Node 12 or later. You can use the [package manager][] of your choice.
Tests need to pass in Node 12 and 14.
1. Install Node 14 or later. You can use the [package manager][] of your choice.
Tests need to pass in Node 14 and 16.
2. Clone this repository.
3. Run `npm ci` to install the dependencies.
4. Run `npm start` to start the badge server and the frontend dev server.
Expand Down Expand Up @@ -142,9 +142,9 @@ Daily tests, including a full run of the service tests and overall code coverage
[gitpod]: https://www.gitpod.io/
[snapshot tests]: https://glebbahmutov.com/blog/snapshot-testing/
[prometheus]: https://prometheus.io/
[prometheus configuration]: doc/self-hosting.md#prometheus
[prometheus configuration]: https://github.com/badges/shields/blob/master/doc/self-hosting.md#prometheus
[sentry]: https://sentry.io/
[sentry configuration]: doc/self-hosting.md#sentry
[sentry configuration]: https://github.com/badges/shields/blob/master/doc/self-hosting.md#sentry
[daily-tests]: https://github.com/badges/daily-tests
[nodemon]: https://nodemon.io/
[nodemon debug]: https://github.com/Microsoft/vscode-recipes/tree/master/nodemon
Expand All @@ -154,7 +154,22 @@ Daily tests, including a full run of the service tests and overall code coverage

There is documentation about [hosting your own server][self-hosting].

[self-hosting]: doc/self-hosting.md
[self-hosting]: https://github.com/badges/shields/blob/master/doc/self-hosting.md

## Related projects

[![Awesome](https://awesome.re/badge.svg)](https://awesome.re)

Status badges are used widely across open-source and private software projects.
Academics have studied the "signal" badges provide about software project
quality. There are many existing libraries for rendering these badges, and
alternatives to the hosted Shields badge service. [awesome-badges][] is a
curated collection of such resources.
[Contributions][contributing to awesome-badges] may be considered there.
(The presence of a project in that collection should not be interpreted as an endorsement nor promotion from the Shields project)

[awesome-badges]: https://github.com/badges/awesome-badges
[contributing to awesome-badges]: https://github.com/badges/awesome-badges/blob/main/CONTRIBUTING.md

## History

Expand All @@ -179,8 +194,8 @@ You can read more about [the project's inception][thread],
[olivierlacan]: https://github.com/olivierlacan
[espadrine]: https://github.com/espadrine
[old-gh-badges]: https://github.com/badges/gh-badges
[motivation]: spec/motivation.md
[spec]: spec/SPECIFICATION.md
[motivation]: https://github.com/badges/shields/blob/master/spec/motivation.md
[spec]: https://github.com/badges/shields/blob/master/spec/SPECIFICATION.md
[thread]: https://github.com/h5bp/lazyweb-requests/issues/150

## Project leaders
Expand All @@ -207,14 +222,6 @@ Alumni:
- [espadrine](https://github.com/espadrine)
- [olivierlacan](https://github.com/olivierlacan)

## Related projects

- [poser PHP library][poser]
- [pybadges python library][pybadges]

[poser]: https://github.com/badges/poser
[pybadges]: https://github.com/google/pybadges

## License

All assets and code are under the [CC0 LICENSE](LICENSE) and in the public
Expand Down
4 changes: 2 additions & 2 deletions badge-maker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"badge": "lib/badge-cli.js"
},
"engines": {
"node": ">= 10",
"npm": ">= 5"
"node": ">= 12",
"npm": ">= 6"
},
"collective": {
"type": "opencollective",
Expand Down
15 changes: 7 additions & 8 deletions core/badge-urls/make-badge-url.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict'

const { URL } = require('url')
const queryString = require('query-string')
const { compile } = require('path-to-regexp')
// Avoid "Attempted import error: 'URL' is not exported from 'url'" in frontend.
import url from 'url'
import queryString from 'query-string'
import { compile } from 'path-to-regexp'

function badgeUrlFromPath({
baseUrl = '',
Expand Down Expand Up @@ -147,13 +146,13 @@ function dynamicBadgeUrl({
function rasterRedirectUrl({ rasterUrl }, badgeUrl) {
// Ensure we're always using the `rasterUrl` by using just the path from
// the request URL.
const { pathname, search } = new URL(badgeUrl, 'https://bogus.test')
const result = new URL(pathname, rasterUrl)
const { pathname, search } = new url.URL(badgeUrl, 'https://bogus.test')
const result = new url.URL(pathname, rasterUrl)
result.search = search
return result
}

module.exports = {
export {
badgeUrlFromPath,
badgeUrlFromPattern,
encodeField,
Expand Down
8 changes: 3 additions & 5 deletions core/badge-urls/make-badge-url.spec.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
'use strict'

const { test, given } = require('sazerac')
const {
import { test, given } from 'sazerac'
import {
badgeUrlFromPath,
badgeUrlFromPattern,
encodeField,
staticBadgeUrl,
queryStringStaticBadgeUrl,
dynamicBadgeUrl,
} = require('./make-badge-url')
} from './make-badge-url.js'

describe('Badge URL generation functions', function () {
test(badgeUrlFromPath, () => {
Expand Down
Loading

0 comments on commit 569c92c

Please sign in to comment.