Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: uiwjs/react-shields
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: uiwjs/react-shields
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.1
Choose a head ref
  • 2 commits
  • 10 files changed
  • 1 contributor

Commits on Aug 29, 2023

  1. type: fix type error.

    jaywcjlove committed Aug 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b6d818e View commit details
  2. released v2.0.1

    jaywcjlove committed Aug 29, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c0aff93 View commit details
Showing with 72 additions and 67 deletions.
  1. +12 −7 core/coverage.d.ts
  2. +28 −19 core/github.d.ts
  3. +13 −9 core/npm.d.ts
  4. +1 −1 core/package.json
  5. +1 −6 core/src/coverages/index.tsx
  6. +1 −12 core/src/github/index.tsx
  7. +1 −7 core/src/npm/index.tsx
  8. +1 −1 lerna.json
  9. +2 −2 www/package.json
  10. +12 −3 www/src/index.tsx
19 changes: 12 additions & 7 deletions core/coverage.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
declare module '@uiw/react-shields/coverage' {
import Container from '@uiw/react-shields/esm/common/Container';
import Coverages from '@uiw/react-shields/esm/coverages/Coverages';
import Codacy from '@uiw/react-shields/esm/coverages/Codacy';
type CoverageComponent = typeof Container & {
Coverages: typeof Coverages;
Codacy: typeof Codacy;
import { ContainerProps } from '@uiw/react-shields/esm/common/Container';

const Coverage: {
(props: ContainerProps): import('react/jsx-runtime').JSX.Element;
Coverages: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/coverages/Coverages').CoveragesProps &
import('react').RefAttributes<HTMLImageElement>
>;
Codacy: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/coverages/Codacy').CodacyProps & import('react').RefAttributes<HTMLImageElement>
>;
displayName: string;
};
const Coverage: CoverageComponent;
export default Coverage;
}
47 changes: 28 additions & 19 deletions core/github.d.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
declare module '@uiw/react-shields/github' {
import Container from '@uiw/react-shields/esm/common/Container';
import Issues from '@uiw/react-shields/esm/github/Issues';
import Size from '@uiw/react-shields/esm/github/Size';
import Downloads from '@uiw/react-shields/esm/github/Downloads';
import Activity from '@uiw/react-shields/esm/github/Activity';
import Version from '@uiw/react-shields/esm/github/Version';
import License from '@uiw/react-shields/esm/github/License';
import Analysis from '@uiw/react-shields/esm/github/Analysis';
import Social from '@uiw/react-shields/esm/github/Social';
type GithubComponent = typeof Container & {
Issues: typeof Issues;
Size: typeof Size;
Downloads: typeof Downloads;
License: typeof License;
Activity: typeof Activity;
Analysis: typeof Analysis;
Version: typeof Version;
Social: typeof Social;
import { ContainerProps } from '@uiw/react-shields/esm/common/Container';
const Github: {
(props: ContainerProps): import('react/jsx-runtime').JSX.Element;
Issues: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Issues').IssuesProps & import('react').RefAttributes<HTMLImageElement>
>;
Size: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Size').SizeProps & import('react').RefAttributes<HTMLImageElement>
>;
Downloads: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Downloads').DownloadsProps & import('react').RefAttributes<HTMLImageElement>
>;
License: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/License').LicenseProps & import('react').RefAttributes<HTMLImageElement>
>;
Activity: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Activity').ActivityProps & import('react').RefAttributes<HTMLImageElement>
>;
Analysis: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Analysis').AnalysisProps & import('react').RefAttributes<HTMLImageElement>
>;
Version: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Version').VersionProps & import('react').RefAttributes<HTMLImageElement>
>;
Social: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/github/Social').SocialProps & import('react').RefAttributes<HTMLImageElement>
>;
displayName: string;
};
const Github: GithubComponent;
export default Github;
}
22 changes: 13 additions & 9 deletions core/npm.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
declare module '@uiw/react-shields/npm' {
import Container from '@uiw/react-shields/esm/common/Container';
import Version from '@uiw/react-shields/esm/npm/Version';
import Size from '@uiw/react-shields/esm/npm/Size';
import Downloads from '@uiw/react-shields/esm/npm/Downloads';
type NpmComponent = typeof Container & {
Version: typeof Version;
Size: typeof Size;
Downloads: typeof Downloads;
import { ContainerProps } from '@uiw/react-shields/esm/common/Container';
const Npm: {
(props: ContainerProps): import('react/jsx-runtime').JSX.Element;
Version: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/npm/Version').VersionProps & import('react').RefAttributes<HTMLImageElement>
>;
Size: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/npm/Size').SizeProps & import('react').RefAttributes<HTMLImageElement>
>;
Downloads: import('react').ForwardRefExoticComponent<
import('@uiw/react-shields/esm/npm/Downloads').DownloadProps & import('react').RefAttributes<HTMLImageElement>
>;
displayName: string;
};
const Npm: NpmComponent;
export default Npm;
}
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@uiw/react-shields",
"version": "2.0.0",
"version": "2.0.1",
"description": "Shields.io for react component, Quality metadata badges for open source projects.",
"author": "Kenny Wong <wowohoo@qq.com>",
"license": "MIT",
7 changes: 1 addition & 6 deletions core/src/coverages/index.tsx
Original file line number Diff line number Diff line change
@@ -2,12 +2,7 @@ import Container, { ContainerProps } from '../common/Container';
import Coverages from './Coverages';
import Codacy from './Codacy';

type CoverageComponent = typeof Container & {
Coverages: typeof Coverages;
Codacy: typeof Codacy;
};

const Coverage = (props: ContainerProps) => (<Container {...props} />) as unknown as CoverageComponent;
const Coverage = (props: ContainerProps) => <Container {...props} />;
Coverage.Coverages = Coverages;
Coverage.Codacy = Codacy;
Coverage.displayName = 'Github';
13 changes: 1 addition & 12 deletions core/src/github/index.tsx
Original file line number Diff line number Diff line change
@@ -8,18 +8,7 @@ import Version from './Version';
import Analysis from './Analysis';
import Social from './Social';

type GithubComponent = typeof Container & {
Issues: typeof Issues;
Size: typeof Size;
Downloads: typeof Downloads;
License: typeof License;
Activity: typeof Activity;
Analysis: typeof Analysis;
Version: typeof Version;
Social: typeof Social;
};

const Github = (props: ContainerProps) => (<Container {...props} />) as unknown as GithubComponent;
const Github = (props: ContainerProps) => <Container {...props} />;

Github.Issues = Issues;
Github.Size = Size;
8 changes: 1 addition & 7 deletions core/src/npm/index.tsx
Original file line number Diff line number Diff line change
@@ -3,13 +3,7 @@ import Version from './Version';
import Size from './Size';
import Downloads from './Downloads';

type NpmComponent = typeof Container & {
Version: typeof Version;
Size: typeof Size;
Downloads: typeof Downloads;
};

const Npm = (props: ContainerProps) => (<Container {...props} />) as unknown as NpmComponent;
const Npm = (props: ContainerProps) => <Container {...props} />;

Npm.Version = Version;
Npm.Size = Size;
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.0.0",
"version": "2.0.1",
"packages": ["core", "www"]
}
4 changes: 2 additions & 2 deletions www/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"version": "2.0.0",
"version": "2.0.1",
"preview": true,
"scripts": {
"build": "kkt build",
@@ -9,7 +9,7 @@
},
"dependencies": {
"@uiw/react-markdown-preview-example": "^1.3.1",
"@uiw/react-shields": "2.0.0",
"@uiw/react-shields": "2.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
15 changes: 12 additions & 3 deletions www/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createRoot } from 'react-dom/client';
import MarkdownPreviewExample from '@uiw/react-markdown-preview-example';
// import Github from '@uiw/react-shields/github';
// import Npm from '@uiw/react-shields/npm';
import Github from '@uiw/react-shields/github';
import Npm from '@uiw/react-shields/npm';
import data from '../../core/README.md';
import pkg from '../../core/package.json';

@@ -21,7 +21,16 @@ root.render(
>
<GithubEx href="https://github.com/uiwjs/react-shields" />
<Example>
<div></div>
<div>
<Github.Social user="jaywcjlove" repo="uiw" href="https://github.com/jaywcjlove" />
<Github user="uiwjs" repo="react-shields">
<Github.Social type="forks" />
<Github.Social type="stars" />
<Github.Social type="watchers" />
<Github.Social type="followers" />
<Npm.Version scope="@uiw" packageName="react-shields" />
</Github>
</div>
</Example>
</MarkdownPreviewExample>,
);