Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major dependency upgradation - inprogress #24

Merged
merged 14 commits into from
Sep 20, 2024
23 changes: 21 additions & 2 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,24 @@
"extends": [
"stylelint-config-recommended",
"stylelint-config-styled-components"
]
}
],
"overrides": [
{
"files": ["**/*.scss"],
"customSyntax": "postcss-scss",
"rules": {
"at-rule-no-unknown": null
}
},
{
"files": ["**/*.{js,ts}"],
"customSyntax": "@stylelint/postcss-css-in-js",
"rules": {
"at-rule-no-unknown": null
}
}
],
"rules": {
"at-rule-no-unknown": null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ exports[`<ErrorState /> should render and match the snapshot 1`] = `
color: grey;
}

.emotion-1 {
.emotion-2 {
white-space: pre-line;
}

<body>
<div>
<div
class="ant-card ant-card-bordered emotion-0"
class="ant-card ant-card-bordered emotion-0 emotion-1"
color="grey"
data-testid="error-state"
>
Expand All @@ -35,7 +35,7 @@ exports[`<ErrorState /> should render and match the snapshot 1`] = `
class="ant-card-body"
>
<span
class="emotion-1"
class="emotion-2"
data-testid="text"
>
Search for a repository by entering it's name in the search box
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Recommended /> should render and match the snapshot 1`] = `
.emotion-0 {
.emotion-2 {
cursor: pointer;
}

.emotion-0:hover {
.emotion-2:hover {
border: 1px solid #006ED6;
}

<body>
<div>
<div
class="ant-row"
class="ant-row emotion-0"
data-testid="recommended"
>
<div
class="ant-col"
class="ant-col emotion-0"
>
<span
class="ant-tag emotion-0"
class="ant-tag emotion-2 emotion-0"
>
test repo name
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ exports[`<RepoList /> should render and match the snapshot 1`] = `
<body>
<div>
<div
class="ant-card ant-card-bordered emotion-0"
class="ant-card ant-card-bordered emotion-0 emotion-1"
data-testid="repo-list"
>
<div
class="ant-card-body"
>
<div
class="ant-skeleton ant-skeleton-active"
class="ant-skeleton ant-skeleton-active emotion-1"
>
<div
class="ant-skeleton-content"
Expand Down
8 changes: 4 additions & 4 deletions app/components/Title/tests/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Title /> should render and match the snapshot 1`] = `
.emotion-0 {
.emotion-1 {
white-space: pre-line;
font-size: 2.25rem;
font-weight: 500;
Expand All @@ -10,17 +10,17 @@ exports[`<Title /> should render and match the snapshot 1`] = `
<body>
<div>
<div
class="ant-row ant-row-space-between ant-row-middle"
class="ant-row ant-row-space-between ant-row-middle emotion-0"
data-testid="title"
>
<span
class="emotion-0"
class="emotion-1"
data-testid="text"
>
default
</span>
<span
class="emotion-0"
class="emotion-1"
data-testid="text"
>
<span
Expand Down
16 changes: 8 additions & 8 deletions app/containers/Info/tests/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`<Info /> container tests should render and match the snapshot 1`] = `
.emotion-0.emotion-0 {
.emotion-2.emotion-2 {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
Expand All @@ -18,19 +18,19 @@ exports[`<Info /> container tests should render and match the snapshot 1`] = `
<body>
<div>
<div
class="ant-row ant-row-center ant-row-middle"
class="ant-row ant-row-center ant-row-middle emotion-0"
flex="1 1 90%"
style="height: 100vh;"
>
<div
class="ant-col"
class="ant-col emotion-0"
>
<div
class="emotion-0"
class="emotion-2"
style="min-width: 30rem;"
>
<div
class="ant-card ant-card-bordered"
class="ant-card ant-card-bordered emotion-0"
>
<div
class="ant-card-head"
Expand All @@ -42,11 +42,11 @@ exports[`<Info /> container tests should render and match the snapshot 1`] = `
class="ant-card-head-title"
>
<div
class="ant-row ant-row-space-between ant-row-middle"
class="ant-row ant-row-space-between ant-row-middle emotion-0"
data-testid="title"
>
<div
class="ant-skeleton ant-skeleton-active"
class="ant-skeleton ant-skeleton-active emotion-0"
>
<div
class="ant-skeleton-content"
Expand Down Expand Up @@ -74,7 +74,7 @@ exports[`<Info /> container tests should render and match the snapshot 1`] = `
class="ant-card-body"
>
<div
class="ant-skeleton ant-skeleton-active"
class="ant-skeleton ant-skeleton-active emotion-0"
>
<div
class="ant-skeleton-content"
Expand Down
78 changes: 41 additions & 37 deletions app/containers/Repos/tests/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,36 @@ exports[`<Repos /> container tests should render and match the snapshot 1`] = `
padding: 20px;
}

.emotion-1 {
.emotion-2 {
white-space: pre-line;
font-size: 1.75rem;
font-weight: 500;
}

.emotion-2 {
.emotion-5 {
text-align: right;
}

.emotion-2.emotion-2 span {
.emotion-5.emotion-5 span {
color: #006ED6;
-webkit-text-decoration: underline;
text-decoration: underline;
}

.emotion-2.emotion-2 span:hover {
.emotion-5.emotion-5 span:hover {
opacity: 0.8;
}

.emotion-3 {
.emotion-6 {
white-space: pre-line;
}

.emotion-4.emotion-4 {
.emotion-8.emotion-8 {
margin: 20px 0;
max-width: 500;
}

.emotion-6.emotion-6 {
.emotion-15.emotion-15 {
margin: 20px 0;
color: grey;
color: grey;
Expand All @@ -57,40 +57,40 @@ exports[`<Repos /> container tests should render and match the snapshot 1`] = `
style="height: 100vh; align-self: center;"
>
<div
class="ant-row"
class="ant-row emotion-1"
>
<span
class="emotion-1"
class="emotion-2"
data-testid="text"
>
Recommended
</span>
</div>
<div
class="ant-row ant-row-space-between"
class="ant-row ant-row-space-between emotion-1"
>
<div
class="ant-row"
class="ant-row emotion-1"
data-testid="recommended"
/>
<a
class="emotion-2"
class="emotion-5"
href="https://www.iamawesome.com/"
>
<span
class="emotion-3"
class="emotion-6"
data-testid="text"
>
You are awesome
</span>
</a>
</div>
<div
class="ant-divider ant-divider-horizontal"
class="ant-divider emotion-1 ant-divider-horizontal"
role="separator"
/>
<div
class="ant-card ant-card-bordered emotion-4"
class="ant-card ant-card-bordered emotion-8 emotion-1"
maxwidth="500"
>
<div
Expand All @@ -110,19 +110,19 @@ exports[`<Repos /> container tests should render and match the snapshot 1`] = `
class="ant-card-body"
>
<span
class="emotion-3"
class="emotion-6"
data-testid="text"
>
Get details of repositories
</span>
<span
class="ant-input-group-wrapper ant-input-search"
class="ant-input-group-wrapper ant-input-group-wrapper-outlined emotion-1 ant-input-search"
>
<span
class="ant-input-wrapper ant-input-group"
class="ant-input-wrapper ant-input-group emotion-1"
>
<input
class="ant-input"
class="ant-input emotion-1 ant-input-outlined"
data-testid="search-bar"
type="text"
value=""
Expand All @@ -131,27 +131,31 @@ exports[`<Repos /> container tests should render and match the snapshot 1`] = `
class="ant-input-group-addon"
>
<button
class="ant-btn ant-btn-default ant-btn-icon-only ant-input-search-button"
class="ant-btn emotion-1 ant-btn-default ant-btn-icon-only ant-input-search-button"
type="button"
>
<span
aria-label="search"
class="anticon anticon-search"
role="img"
class="ant-btn-icon"
>
<svg
aria-hidden="true"
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
<span
aria-label="search"
class="anticon anticon-search"
role="img"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
<svg
aria-hidden="true"
data-icon="search"
fill="currentColor"
focusable="false"
height="1em"
viewBox="64 64 896 896"
width="1em"
>
<path
d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
/>
</svg>
</span>
</span>
</button>
</span>
Expand All @@ -160,7 +164,7 @@ exports[`<Repos /> container tests should render and match the snapshot 1`] = `
</div>
</div>
<div
class="ant-card ant-card-bordered emotion-6"
class="ant-card ant-card-bordered emotion-15 emotion-1"
color="grey"
data-testid="error-state"
>
Expand All @@ -181,7 +185,7 @@ exports[`<Repos /> container tests should render and match the snapshot 1`] = `
class="ant-card-body"
>
<span
class="emotion-3"
class="emotion-6"
data-testid="text"
>
Search for a repository by entering it's name in the search box
Expand Down
2 changes: 1 addition & 1 deletion jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'jest-styled-components';
import '@testing-library/jest-dom/extend-expect';
import '@testing-library/jest-dom';
import { matchers } from '@emotion/jest';

Object.defineProperty(window, 'matchMedia', {
Expand Down
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @type {import('next').NextConfig} */
const withImages = require('next-images');
const path = require('path');
const withTM = require('next-transpile-modules')([
Expand All @@ -22,7 +23,7 @@ const constructAlias = (config) => {

module.exports = withTM(
withImages({
assetPrefix: process.env.BASE_PATH || '',
assetPrefix: process.env.BASE_PATH || undefined,
basePath: process.env.BASE_PATH || '',
trailingSlash: true,
webpack(config) {
Expand Down
Loading
Loading