Skip to content

Commit

Permalink
⬆️ update all dependencies and fix E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Yago committed Feb 8, 2024
1 parent c5e84f1 commit 2d2615e
Show file tree
Hide file tree
Showing 13 changed files with 107 additions and 63 deletions.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

bun run lint-staged
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"editor.formatOnSave": true
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true,
"source.fixAll.tslint": true
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit",
"source.fixAll.tslint": "explicit"
},
"editor.formatOnSave": false,
"eslint.enable": true,
Expand All @@ -31,4 +31,5 @@
"scss",
"postcss"
]
"eslint.workingDirectories": [".", "playground"]
}
Binary file added bun.lockb
Binary file not shown.
32 changes: 25 additions & 7 deletions cypress/integration/first-test.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,37 @@
/* globals cy */

describe('Homepage', () => {
beforeEach(() => cy.visit('/'));
it('Pages Router - should display the count', () => {
cy.visit('/pages-router')
cy.get('#count').should('have.length', 1);
});

it('Pages Router - should increase the count', () => {
cy.visit('/pages-router')
cy.get('#counter > button:last-child').click({ force: true });
cy.get('#count').should('contain', '1');
});

it('Pages Router - should decrease the count', () => {
cy.visit('/pages-router')
cy.get('#counter > button:first-child').click({ force: true });
cy.get('#count').should('contain', '-1');
});

it('should display the count', () => {
cy.get('#counter > span').should('have.length', 1);
it('App Router - should display the count', () => {
cy.visit('/app-router')
cy.get('#count').should('have.length', 1);
});

it('should increase the count', () => {
it('App Router - should increase the count', () => {
cy.visit('/app-router')
cy.get('#counter > button:last-child').click({ force: true });
cy.get('#counter > span').should('contain', '1');
cy.get('#count').should('contain', '1');
});

it('should decrease the count', () => {
it('App Router - should decrease the count', () => {
cy.visit('/app-router')
cy.get('#counter > button:first-child').click({ force: true });
cy.get('#counter > span').should('contain', '-1');
cy.get('#count').should('contain', '-1');
});
});
43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,48 +25,49 @@
"jest:start": "node --experimental-vm-modules node_modules/jest/bin/jest.js --watchAll",
"jest:run": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"dev": "cd playground && node_modules/.bin/next dev",
"start": "cd playground && node_modules/.bin/next start",
"build": "cd playground && node_modules/.bin/next build",
"storybook:start": "cd playground && storybook dev --no-open -p 6006",
"storybook:build": "cd playground && storybook build",
"postinstall": "husky install",
"postinstall": "husky",
"prepublishOnly": "pinst --disable",
"postpublish": "pinst --enable"
},
"devDependencies": {
"@swc/core": "^1.3.99",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.10",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@swc/core": "^1.4.0",
"@swc/jest": "^0.2.36",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"babel-eslint": "^10.1.0",
"cypress": "^13.6.0",
"dotenv": "^16.3.1",
"eslint": "^8.54.0",
"cypress": "^13.6.4",
"dotenv": "^16.4.1",
"eslint": "^8.56.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-tailwind": "^0.2.1",
"husky": "^8.0.3",
"husky": "^9.0.10",
"jest": "^29.7.0",
"lint-staged": "^15.1.0",
"lint-staged": "^15.2.2",
"pinst": "^3.0.0",
"prettier": "^3.1.0",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-order": "^6.0.3",
"typescript": "5.3.2"
"prettier": "^3.2.5",
"stylelint": "^16.2.1",
"stylelint-config-standard": "^36.0.0",
"stylelint-order": "^6.0.4",
"typescript": "5.3.3"
},
"dependencies": {
"fs-extra": "^11.2.0",
"inquirer": "^9.2.12",
"ora": "^7.0.1"
"inquirer": "^9.2.14",
"ora": "^8.0.1"
}
}
1 change: 1 addition & 0 deletions playground/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
56 changes: 28 additions & 28 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,42 @@
},
"dependencies": {
"@tailwindcss/forms": "^0.5.7",
"@tanstack/react-query": "^5.9.0",
"@tanstack/react-query-devtools": "^5.9.0",
"axios": "^1.6.2",
"clsx": "^2.0.0",
"i18next": "^23.7.7",
"next": "14.0.3",
"@tanstack/react-query": "^5.18.1",
"@tanstack/react-query-devtools": "^5.18.1",
"axios": "^1.6.7",
"clsx": "^2.1.0",
"i18next": "^23.8.2",
"next": "14.1.0",
"ramda": "^0.29.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-i18next": "^13.5.0",
"react-i18next": "^14.0.5",
"zod": "^3.22.4"
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@storybook/addon-actions": "^7.6.0",
"@storybook/addon-docs": "^7.6.0",
"@storybook/addon-essentials": "^7.6.0",
"@storybook/addon-links": "^7.6.0",
"@storybook/builder-vite": "^7.6.0",
"@storybook/nextjs": "^7.6.0",
"@storybook/react": "^7.6.0",
"@storybook/react-vite": "^7.6.0",
"@types/jest": "^29.5.10",
"@types/node": "^20.10.0",
"@types/ramda": "^0.29.9",
"@types/react": "^18.2.39",
"@types/react-dom": "^18.2.17",
"autoprefixer": "^10.4.16",
"postcss": "^8.4.31",
"postcss-import": "^15.1.0",
"@babel/core": "^7.23.9",
"@storybook/addon-actions": "^7.6.13",
"@storybook/addon-docs": "^7.6.13",
"@storybook/addon-essentials": "^7.6.13",
"@storybook/addon-links": "^7.6.13",
"@storybook/builder-vite": "^7.6.13",
"@storybook/nextjs": "^7.6.13",
"@storybook/react": "^7.6.13",
"@storybook/react-vite": "^7.6.13",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.16",
"@types/ramda": "^0.29.10",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"autoprefixer": "^10.4.17",
"postcss": "^8.4.35",
"postcss-import": "^16.0.0",
"react-docgen-typescript": "^2.2.2",
"storybook": "^7.6.0",
"storybook": "^7.6.13",
"svg-sprite": "^2.0.2",
"tailwindcss": "^3.3.5",
"typescript": "5.3.2",
"vite": "^5.0.4"
"tailwindcss": "^3.4.1",
"typescript": "5.3.3",
"vite": "^5.1.0"
},
"license": "MIT"
}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion playground/src/components/Counter/Counter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Counter: React.FC<CounterProps> = ({ initial, onChange }) => {
</button>
<span className="px-4 text-2xl font-bold">
<Icon className="text-xl" />
{count}
<span id="count">{count}</span>
</span>
<button
type="button"
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions playground/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react';
import Link from 'next/link';

import Layout from '@/components/Layout';

const Home: React.FC = () => (
<Layout>
<div className="flex flex-col items-center justify-center w-full h-screen">
<h1 className="text-3xl font-bold">Pick your Router</h1>
<ul className="list-disc list">
<li>
<Link href="/pages-router" className="underline">
Pages Router
</Link>
</li>
<li>
<Link href="/app-router" className="underline">
App Router
</Link>
</li>
</ul>
</div>
</Layout>
);

export default Home;
File renamed without changes.

0 comments on commit 2d2615e

Please sign in to comment.