Skip to content

Commit

Permalink
chore: 🤖 chore: 🤖 bump nx.dev next.js 13+ Storybook 6.5.16
Browse files Browse the repository at this point in the history
  • Loading branch information
flexbox committed Mar 12, 2023
1 parent 04b54ab commit 27b874e
Show file tree
Hide file tree
Showing 12 changed files with 1,833 additions and 1,948 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
4 changes: 3 additions & 1 deletion apps/weshipit/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const nextConfig = {
nx: {
// Set this to true if you would like to to use SVGR
// See: https://github.com/gregberge/svgr
svgr: false,
svgr: true,
},
images: {
remotePatterns: [
Expand All @@ -28,6 +28,8 @@ const nextConfig = {
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},
// https://github.com/nrwl/nx/issues/15214
transpilePackages: [],
};

module.exports = withNx(nextConfig);
2 changes: 1 addition & 1 deletion apps/weshipit/pages/api/hello.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { NextRequest, NextResponse } from 'next/server';

export const config = {
runtime: 'experimental-edge', // this is a pre-requisite
runtime: 'edge', // this is a pre-requisite
};

// eslint-disable-next-line import/no-anonymous-default-export
Expand Down
2 changes: 1 addition & 1 deletion apps/weshipit/pages/api/og.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ImageResponse } from '@vercel/og';
import { NextRequest } from 'next/server';

export const config = {
runtime: 'experimental-edge',
runtime: 'edge',
};

export default function handler(req: NextRequest) {
Expand Down
8 changes: 5 additions & 3 deletions apps/weshipit/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
"executor": "nx:run-commands",
"options": {
"commands": [
{
"command": "next-sitemap --config apps/weshipit/next-sitemap.config.js"
}
// raise this error
// ❌ [next-sitemap] Unable to find export-maker.
// {
// "command": "next-sitemap --config apps/weshipit/next-sitemap.config.js"
// }
]
}
},
Expand Down
14 changes: 13 additions & 1 deletion jest.preset.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
const nxPreset = require('@nrwl/jest/preset').default;

module.exports = { ...nxPreset };
module.exports = {
...nxPreset,
/* TODO: Update to latest Jest snapshotFormat
* By default Nx has kept the older style of Jest Snapshot formats
* to prevent breaking of any existing tests with snapshots.
* It's recommend you update to the latest format.
* You can do this by removing snapshotFormat property
* and running tests with --update-snapshot flag.
* Example: "nx affected --targets=test --update-snapshot"
* More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
*/
snapshotFormat: { escapeString: true, printBasicPrototype: true },
};
6 changes: 5 additions & 1 deletion libs/ui/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ module.exports = {
'../src/lib/**/*.stories.mdx',
'../src/lib/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [...rootMain.addons, '@nrwl/react/plugins/storybook'],
addons: [
'@storybook/addon-essentials',
...rootMain.addons,
'@nrwl/react/plugins/storybook',
],
};
13 changes: 7 additions & 6 deletions libs/ui/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
export default {
displayName: 'ui',
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
globals: {},
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
'^.+\\.[tj]sx?$': [
'ts-jest',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
},
],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../../coverage/libs/ui',
Expand Down
16 changes: 6 additions & 10 deletions libs/ui/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "ui",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/ui/src",
"projectType": "library",
Expand All @@ -24,9 +25,7 @@
"options": {
"uiFramework": "@storybook/react",
"port": 4400,
"config": {
"configFolder": "libs/ui/.storybook"
}
"configDir": "libs/ui/.storybook"
},
"configurations": {
"ci": {
Expand All @@ -36,20 +35,17 @@
},
"build-storybook": {
"executor": "@nrwl/storybook:build",
"outputs": ["{options.outputPath}"],
"outputs": ["{options.outputDir}"],
"options": {
"uiFramework": "@storybook/react",
"outputPath": "dist/storybook/ui",
"config": {
"configFolder": "libs/ui/.storybook"
}
"configDir": "libs/ui/.storybook",
"outputDir": "dist/storybook/ui"
},
"configurations": {
"ci": {
"quiet": true
}
}
}
},
"name": "ui"
}
}
91 changes: 46 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"--nx--": "-------------------------------------------------------",
"start": "nx serve",
"build": "nx build",
"test": "nx test",
"test": "nx run-many --all --target=test",
"lint": "nx lint",
"graph": "nx graph",
"cache:clear": "nx reset",
Expand All @@ -30,62 +30,63 @@
},
"private": true,
"dependencies": {
"@apollo/client": "^3.7.1",
"@calcom/embed-react": "^1.0.9",
"@headlessui/react": "^1.7.7",
"@heroicons/react": "^2.0.13",
"@next/font": "^13.0.3",
"@apollo/client": "^3.7.10",
"@calcom/embed-react": "^1.0.10",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.16",
"@next/font": "^13.2.3",
"@prismicio/client": "^6.7.1",
"@prismicio/react": "^2.5.0",
"@vercel/og": "^0.0.20",
"@prismicio/react": "^2.5.2",
"@vercel/og": "^0.3.0",
"autoprefixer": "^10.4.13",
"class-variance-authority": "^0.4.0",
"core-js": "^3.6.5",
"core-js": "^3.29.0",
"graphql": "^16.6.0",
"lodash": "^4.17.21",
"next": "13.1.1",
"next": "13.2.4",
"next-seo": "^5.14.1",
"next-sitemap": "^3.1.31",
"postcss": "^8.4.20",
"next-sitemap": "^4.0.2",
"postcss": "^8.4.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-gravatar": "^2.6.3",
"regenerator-runtime": "0.13.7",
"tailwindcss": "^3.2.4",
"tslib": "^2.3.0"
"regenerator-runtime": "0.13.11",
"tailwindcss": "^3.2.7",
"tslib": "^2.5.0"
},
"devDependencies": {
"@babel/core": "7.12.13",
"@babel/preset-react": "^7.14.5",
"@babel/preset-typescript": "7.12.13",
"@nrwl/cli": "15.3.3",
"@nrwl/cypress": "15.3.3",
"@nrwl/eslint-plugin-nx": "15.3.3",
"@nrwl/jest": "15.8.5",
"@nrwl/js": "15.8.5",
"@nrwl/linter": "15.3.3",
"@nrwl/next": "15.8.5",
"@nrwl/react": "15.8.5",
"@nrwl/storybook": "15.3.3",
"@nrwl/web": "15.3.3",
"@nrwl/workspace": "15.3.3",
"@storybook/addon-essentials": "~6.5.13",
"@storybook/builder-webpack5": "~6.5.13",
"@storybook/core-server": "~6.5.13",
"@storybook/manager-webpack5": "~6.5.13",
"@storybook/react": "~6.5.13",
"@svgr/webpack": "^6.5.1",
"@testing-library/react": "14.0.0",
"@types/jest": "^29.4.0",
"@types/node": "18.14.2",
"@types/react": "18.0.28",
"@types/react-dom": "18.0.11",
"@nrwl/cli": "15.8.6",
"@nrwl/cypress": "15.8.6",
"@nrwl/eslint-plugin-nx": "15.8.6",
"@nrwl/jest": "15.8.6",
"@nrwl/js": "15.8.6",
"@nrwl/linter": "15.8.6",
"@nrwl/next": "15.8.6",
"@nrwl/react": "15.8.6",
"@nrwl/storybook": "15.8.6",
"@nrwl/web": "15.8.6",
"@nrwl/webpack": "15.8.6",
"@nrwl/workspace": "15.8.6",
"@storybook/addon-essentials": "6.5.16",
"@storybook/builder-webpack5": "6.5.16",
"@storybook/core-server": "6.5.16",
"@storybook/manager-webpack5": "6.5.16",
"@storybook/react": "6.5.16",
"@svgr/webpack": "^5.4.0",
"@testing-library/react": "13.4.0",
"@types/jest": "29.4.0",
"@types/node": "18.11.9",
"@types/react": "18.0.25",
"@types/react-dom": "18.0.9",
"@types/react-gravatar": "^2.6.10",
"@typescript-eslint/eslint-plugin": "5.41.0",
"@typescript-eslint/parser": "5.41.0",
"babel-jest": "^29.4.1",
"babel-loader": "9.1.2",
"cypress": "^11.0.0",
"babel-jest": "29.4.3",
"babel-loader": "8.1.0",
"cypress": "^12.2.0",
"cz-conventional-changelog": "3.3.0",
"eslint": "~8.30.0",
"eslint-config-next": "13.1.1",
Expand All @@ -98,15 +99,15 @@
"eslint-plugin-tailwindcss": "^3.7.1",
"git-cz": "^4.9.0",
"husky": "^8.0.2",
"jest": "^29.4.1",
"jest-environment-jsdom": "^29.4.1",
"jest": "29.4.3",
"jest-environment-jsdom": "29.4.3",
"lint-staged": "^13.0.3",
"prettier": "^2.6.2",
"react-test-renderer": "18.2.0",
"ts-jest": "^29.0.5",
"ts-jest": "29.0.5",
"ts-node": "10.9.1",
"typescript": "~4.9.5",
"url-loader": "^4.1.1"
"typescript": "4.9.5",
"url-loader": "^3.0.0"
},
"lint-staged": {
"*.{js,ts,tsx}": "eslint --cache --fix",
Expand Down
10 changes: 0 additions & 10 deletions workspace.json

This file was deleted.

Loading

0 comments on commit 27b874e

Please sign in to comment.