diff --git a/.husky/pre-commit b/.husky/pre-commit
index d28fd9d..f2d66f6 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1,4 +1 @@
-#!/bin/sh
-. "$(dirname "$0")/_/husky.sh"
-
bun run lint-staged
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 7e5b458..1e05808 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -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,
@@ -31,4 +31,5 @@
"scss",
"postcss"
]
+ "eslint.workingDirectories": [".", "playground"]
}
diff --git a/bun.lockb b/bun.lockb
new file mode 100755
index 0000000..9077cbb
Binary files /dev/null and b/bun.lockb differ
diff --git a/cypress/integration/first-test.e2e.ts b/cypress/integration/first-test.e2e.ts
index 7efac7e..e3a5d46 100644
--- a/cypress/integration/first-test.e2e.ts
+++ b/cypress/integration/first-test.e2e.ts
@@ -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');
});
});
diff --git a/package.json b/package.json
index e8cf084..57c6f32 100644
--- a/package.json
+++ b/package.json
@@ -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"
}
}
diff --git a/playground/next-env.d.ts b/playground/next-env.d.ts
index 4f11a03..fd36f94 100644
--- a/playground/next-env.d.ts
+++ b/playground/next-env.d.ts
@@ -1,5 +1,6 @@
///
///
+///
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
diff --git a/playground/package.json b/playground/package.json
index f84a36b..99bcbd8 100644
--- a/playground/package.json
+++ b/playground/package.json
@@ -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"
}
diff --git a/playground/src/_app/page.tsx b/playground/src/app/app-router/page.tsx
similarity index 100%
rename from playground/src/_app/page.tsx
rename to playground/src/app/app-router/page.tsx
diff --git a/playground/src/_app/layout.tsx b/playground/src/app/layout.tsx
similarity index 100%
rename from playground/src/_app/layout.tsx
rename to playground/src/app/layout.tsx
diff --git a/playground/src/components/Counter/Counter.tsx b/playground/src/components/Counter/Counter.tsx
index bde023b..562bf0d 100644
--- a/playground/src/components/Counter/Counter.tsx
+++ b/playground/src/components/Counter/Counter.tsx
@@ -26,7 +26,7 @@ const Counter: React.FC = ({ initial, onChange }) => {
- {count}
+ {count}