Skip to content

Commit

Permalink
update components (#2340)
Browse files Browse the repository at this point in the history
* bump nextra

* aa
  • Loading branch information
dimaMachina committed Apr 11, 2024
1 parent a5e95ef commit cf986ab
Show file tree
Hide file tree
Showing 20 changed files with 79 additions and 80 deletions.
7 changes: 4 additions & 3 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with
multi-package repos, or single-package repos to help you version and publish your code. You can find the full
documentation for it [in our repository](https://github.com/changesets/changesets)
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool
that works with multi-package repos, or single-package repos to help you version and publish your
code. You can find the full documentation for it
[in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ blank_issues_enabled: false
contact_links:
- name: Have a question?
url: https://github.com/Urigo/graphql-scalars/discussions/new
about: Not sure about something? need help from the community? have a question to our team? please ask and answer questions here.
about:
Not sure about something? need help from the community? have a question to our team? please
ask and answer questions here.
23 changes: 16 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
🚨 **IMPORTANT: Please do not create a Pull Request without creating an issue first.**

*Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.*
_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request._

## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Please include a summary of the change and which issue is fixed. Please also include relevant
motivation and context. List any dependencies that are required for this change.

Related # (issue)

Expand All @@ -14,28 +16,34 @@ Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as
expected)
- [ ] This change requires a documentation update

## Screenshots/Sandbox (if appropriate/relevant):

Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
Adding links to sandbox or providing screenshots can help us understand more about this PR and take
action on it as appropriate

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

**Test Environment**:

- OS:
- GraphQL Scalars Version:
- NodeJS:

## Checklist:

- [ ] I have followed the [CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the style guidelines of this project
- [ ] I have followed the
[CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the
style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
Expand All @@ -46,4 +54,5 @@ Please describe the tests that you ran to verify your changes. Provide instructi

## Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
If this is a relatively large or complex change, kick off the discussion by explaining why you chose
the solution you did and what alternatives you considered, etc...
22 changes: 11 additions & 11 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
- color: ee0701
description: ""
description: ''
name: bug
- color: 006b75
description: ""
description: ''
name: chore
- color: 0366d6
description: Pull requests that update a dependency file
name: dependencies
- color: cccccc
description: ""
description: ''
name: duplicate
- color: 84b6eb
description: ""
description: ''
name: enhancement
- color: 5319e7
description: ""
description: ''
name: feature request
- color: 128A0C
description: ""
description: ''
name: help wanted
- color: e6e6e6
description: ""
description: ''
name: invalid
- color: cc317c
description: ""
description: ''
name: question
- color: 5319e7
description: ""
description: ''
name: waiting-for-answer
- color: d4c5f9
description: ""
description: ''
name: waiting-for-release
- color: ffffff
description: ""
description: ''
name: wontfix
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ jobs:
script: yarn ci:lint
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}

14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
stable:
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
releaseScript: release
nodeVersion: 18
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
uses: the-guild-org/shared-config/.github/workflows/release-stable.yml@main
with:
releaseScript: release
nodeVersion: 18
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
npmToken: ${{ secrets.NODE_AUTH_TOKEN }}
8 changes: 6 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
jobs:
deployment:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
if:
github.event.pull_request.head.repo.full_name == github.repository || github.event_name ==
'push'
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -29,7 +31,9 @@ jobs:
name: build and deploy website
env:
NEXT_BASE_PATH: ${{ github.ref == 'refs/heads/master' && '/graphql/scalars' || '' }}
SITE_URL: ${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/scalars' || '' }}
SITE_URL:
${{ github.ref == 'refs/heads/master' && 'https://the-guild.dev/graphql/scalars' || ''
}}
with:
cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflareAccountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
2 changes: 1 addition & 1 deletion codegen-test/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ schema: ./test-schema.js
generates:
types.ts:
plugins:
- typescript
- typescript
9 changes: 6 additions & 3 deletions src/RegularExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ export class RegularExpression extends GraphQLScalarType {
}

if (!('value' in ast) || ast.kind === Kind.ENUM) {
throw createGraphQLError(`Can only validate primitive values as ${name} but got a: ${ast.kind}`, {
nodes: [ast],
});
throw createGraphQLError(
`Can only validate primitive values as ${name} but got a: ${ast.kind}`,
{
nodes: [ast],
},
);
}

if (ast.value != null && !regex.test(ast.value.toString())) {
Expand Down
2 changes: 1 addition & 1 deletion src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ export function createGraphQLError(message: string, options?: GraphQLErrorOption
options?.positions,
options?.path,
options?.originalError,
options?.extensions
options?.extensions,
);
}
4 changes: 1 addition & 3 deletions src/scalars/iso-date/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
// 2016-01-01T11:00:12Z.
export const parseTime = (time: string): Date => {
const currentDateString = new Date().toISOString();
return new Date(
currentDateString.substr(0, currentDateString.indexOf('T') + 1) + time,
);
return new Date(currentDateString.substr(0, currentDateString.indexOf('T') + 1) + time);
};

// Serializes a Date into an RFC 3339 compliant time-string in the
Expand Down
10 changes: 5 additions & 5 deletions src/scalars/iso-date/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ const leapYear = (year: number): boolean => {
//
export const validateTime = (time: string): boolean => {
time = time?.toUpperCase();
const TIME_REGEX = /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
const TIME_REGEX =
/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
return TIME_REGEX.test(time);
};

Expand Down Expand Up @@ -119,7 +120,8 @@ export const validateDate = (datestring: string): boolean => {
//
export const validateDateTime = (dateTimeString: string): boolean => {
dateTimeString = dateTimeString?.toUpperCase();
const RFC_3339_REGEX = /^(\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60))(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;
const RFC_3339_REGEX =
/^(\d{4}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60))(\.\d{1,})?(([Z])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/;

// Validate the structure of the date-string
if (!RFC_3339_REGEX.test(dateTimeString)) {
Expand Down Expand Up @@ -148,9 +150,7 @@ export const validateDateTime = (dateTimeString: string): boolean => {
export const validateUnixTimestamp = (timestamp: number): boolean => {
const MAX_INT = 2147483647;
const MIN_INT = -2147483648;
return (
timestamp === timestamp && timestamp <= MAX_INT && timestamp >= MIN_INT
); // eslint-disable-line
return timestamp === timestamp && timestamp <= MAX_INT && timestamp >= MIN_INT; // eslint-disable-line
};

// Function that checks whether a javascript Date instance
Expand Down
2 changes: 1 addition & 1 deletion src/scalars/json/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function ensureObject(value: any, ast?: ValueNode): object {
? {
nodes: ast,
}
: undefined
: undefined,
);
}

Expand Down
2 changes: 1 addition & 1 deletion website/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ out
dist
build
public/_redirects
public/sitemap*.xml
public/sitemap*.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @type {import('next-sitemap').IConfig} */

module.exports = {
export default {
siteUrl: process.env.SITE_URL || 'https://the-guild.dev/graphql/scalars',
generateIndexSitemap: false,
exclude: ['*/_meta'],
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "website",
"version": "0.7.0",
"type": "module",
"private": true,
"scripts": {
"analyze": "cross-env ANALYZE=true next build",
"build": "next build && next-sitemap --config next-sitemap.config.cjs",
"build": "next build && next-sitemap",
"dev": "next dev",
"next": "next",
"start": "next start"
},
"dependencies": {
"@theguild/components": "6.5.2",
"@theguild/components": "6.5.3",
"next": "14.1.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@theguild/tailwind-config": "0.4.0",
"@theguild/tailwind-config": "0.4.1",
"@types/node": "20.12.7",
"@types/react": "18.2.75",
"cross-env": "7.0.3",
Expand Down
1 change: 0 additions & 1 deletion website/tailwind.config.cjs

This file was deleted.

1 change: 1 addition & 0 deletions website/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@theguild/tailwind-config';
36 changes: 10 additions & 26 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,10 @@
resolved "https://registry.yarnpkg.com/@tanstack/virtual-core/-/virtual-core-3.2.0.tgz#874d36135e4badce2719e7bdc556ce240cbaff14"
integrity sha512-P5XgYoAw/vfW65byBbJQCw+cagdXDT/qH6wmABiLt4v4YBT2q2vqCOhihe+D1Nt325F/S/0Tkv6C5z0Lv+VBQQ==

"@theguild/components@6.5.2":
version "6.5.2"
resolved "https://registry.yarnpkg.com/@theguild/components/-/components-6.5.2.tgz#690b5b352754b6e84f44650ed71e89c1cb16a31b"
integrity sha512-ZgU1xr0b4wap57gjwSwYG27lLMCez/rEEvGgxbxCEUziyFK/fVsCEQC6wIzbJfJt2CHvsR2gjiUcnNsaHSQM9Q==
"@theguild/components@6.5.3":
version "6.5.3"
resolved "https://registry.yarnpkg.com/@theguild/components/-/components-6.5.3.tgz#4d1e1606b438ca649910f486ff02cfcd23ceb35e"
integrity sha512-ZVetOUe06X9ji091F46gwGZdB3eM9vykbCOjsU6OYFJ+Ft/ZHvH3pLVZ4ObPTA1iRgNpd38e34DXTohnPoRNDA==
dependencies:
"@giscus/react" "3.0.0"
"@next/bundle-analyzer" "13.4.2"
Expand Down Expand Up @@ -359,10 +359,10 @@
npm-to-yarn "^2.1.0"
unist-util-visit "^5.0.0"

"@theguild/tailwind-config@0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@theguild/tailwind-config/-/tailwind-config-0.4.0.tgz#30d348c2ed2b58d10d48985346207a4a06ccbccc"
integrity sha512-yBKCWCObEpu8JvB4aPXysDHmwecGJyms6P6Gj3LG3cA+3HiWTj/bqjU4TigotK+n/Dg/bbP4ZllYfhg4Llzypg==
"@theguild/tailwind-config@0.4.1":
version "0.4.1"
resolved "https://registry.yarnpkg.com/@theguild/tailwind-config/-/tailwind-config-0.4.1.tgz#371a2b98333cf5293dc025f05d10b8e6299046c4"
integrity sha512-o04kB4/fzlSPUS6LRMjTCmiozmDzrYPDB4rIRd3g/6ELcPbU45Zv+WcsZHxR5djgh0SuL6tCyFZji8cXdCvH/A==
dependencies:
autoprefixer "^10.4.19"
cssnano "^6.1.2"
Expand Down Expand Up @@ -4107,16 +4107,7 @@ streamsearch@^1.1.0:
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -4142,14 +4133,7 @@ stringify-entities@^4.0.0:
character-entities-html4 "^2.0.0"
character-entities-legacy "^3.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down

0 comments on commit cf986ab

Please sign in to comment.