-
Notifications
You must be signed in to change notification settings - Fork 29
/
package.json
237 lines (237 loc) · 11.1 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
{
"name": "vulcan-next",
"version": "0.8.1-y.0",
"private": true,
"scripts": {
"//----- DEVELOP -----": "",
"//_____Lifecycle_____": "",
"postinstall": "node ./.vn/scripts/fix-apollo.js",
"//____Utilities_____": "",
"clean": "rm -Rf ./dist ./storybook-static .yalc .next",
"clean:next": "rm -Rf .next",
"//_____TS scripts_____": "",
"build:scripts": "tsup-node --external graphql --external graphql-tag --treeshake",
"//____Mongo database and seed_____": "",
"db:test:seed": "dotenv -e .env.test node .vn/scripts/js-generated/seed.mjs",
"//db:test:reset": "### Reset can only happen against the test database!",
"db:test:reset": "dotenv -e .env.test node .vn/scripts/js-generated/reset.mjs",
"mongo": "yarn run start:mongo",
"//start:mongo": "### Will start or create & start the image + store data locally in .mongo folder + remove the container when stopped.",
"start:mongo": "docker run --rm -p 27017:27017 -v \"$(pwd)/.mongo:/data/db\" --label vulcan-mongodb mongo:4.0.4 ",
"//start:mongo:windows": "### See https://stackoverflow.com/questions/46604827/pwd-in-npm-script/71214387",
"start:mongo:windows": "docker run --rm -p 27017:27017 -v \"%cd%\\.mongo:/data/db\" --label vulcan-mongodb mongo:4.0.4",
"//_____Dev Next app____": "",
"dev": "next",
"//_____Build next app_____": "",
"//prebuild": "# Temporary fix for https://github.com/vercel/next.js/issues/35110 and https://github.com/yarnpkg/berry/issues/1339#issuecomment-1136132035",
"prebuild": "(node .vn/scripts/is-monorepo.js && rm -Rf ./node_modules/@vulcanjs && mkdir -p ./node_modules/@vulcanjs && cp -R ../../packages/* ./node_modules/@vulcanjs) || echo 'Not in the context of a monorepo, ok'",
"//build": "# Tip: on failure, we drop .next to avoid caching issue. Run 'prebuild' explicitely",
"build": "yarn run prebuild && next build || (rm -Rf .next && exit 1) && yarn run postbuild",
"postbuild": "next-sitemap --config vulcan-next-sitemap.js",
"start": "next start",
"//_____Static build_____": "",
"build:static": "# Next Export is not compatible with i18n, this feature is now deactivated in Vulcan Next. See https://github.com/VulcanJS/vulcan-next/issues/98 #next build && next export",
"build:test:docker": "docker build -f ./.vn/docker/cypress.dockerfile -t vulcan-next-test .",
"start:static": "# Next Export is not compatible with i18n, this feature is now deactivated in Vulcan Next. See https://github.com/VulcanJS/vulcan-next/issues/98 #serve ./out",
"//----- TEST -----": "",
"//____Tests_____": "",
"test:e2e": "cross-env NODE_ENV=test rm -Rf .next && npm run build && start-server-and-test start:test http://localhost:3000 cypress:run",
"test:unit": "jest",
"//test:vn": "# run tests for Vulcan Next itself, eg scripts (long)",
"test:vn": "jest --config=./.vn/jest.config.vn.js --testPathPattern=tests/vn",
"test": "npm run test:unit && npm run test:e2e",
"//____Quality and linting____": "",
"lint": "yarn run next lint",
"typecheck-watch": "tsc --noEmit --p src/tsconfig.json -w",
"//typecheck": "# in case of error with @vulcanjs/* package, check that src/types (eg simpl-schema) are up-to-date with vulcan-npm",
"typecheck": "tsc --noEmit --p src/tsconfig.json",
"//_____Debug____": "",
"analyze:bundle": "cross-env ANALYZE=true npm run build",
"debug": "NODE_OPTIONS='--inspect' next",
"//_____Storybook_____": "",
"chromatic": "dotenv -e .env.development.local chromatic --build-script-name build-storybook",
"build:storybook": "rm -Rf storybook-static && build-storybook -s ./public # TODO: we shouldn't need to remove, but Storybook 6.1 has a small bug and can't remove existing build automatically",
"build-storybook": "build-storybook",
"analyze:bundle:storybook": "cross-env ANALYZE=true yarn run build:storybook",
"storybook": "start-storybook -p 6006 -s ./public",
"start:storybook-static": "serve storybook-static",
"//_____Cypress_____": "",
"cypress:open": "cross-env CYPRESS_coverage=false NODE_ENV=test cypress open",
"cypress:run": "cross-env CYPRESS_DEBUG=false CYPRESS_coverage=false NODE_ENV=test cypress run --headless",
"//_____Not yet sorted____": "",
"//dev:test": "Starts app in test + dev mode (mainly for Cypress)",
"dev:test": "yarn run clean:next && cross-env NODE_ENV=test next",
"//start:test": "Starts app in test mode",
"start:test": "cross-env NODE_ENV=test npm run start",
"//_____Coverage____": "",
"precombine:reports": "npm run copy:reports && rm -Rf .nyc_output && mkdir .nyc_output || true",
"combine:reports": "yarn run precombine:reports && nyc merge reports && mv coverage.json .nyc_output/out.json # intermediate script",
"precopy:reports": "npm run mkdir:reports # intermediate script",
"copy:reports": "yarn run precopy:reports && cp coverage-e2e/coverage-final.json reports/from-cypress.json && cp coverage-unit/coverage-final.json reports/from-jest.json # intermediate scripts",
"//precoverage": " # delete previous nyx instrumentation",
"precoverage": "rm -rf .nyc_output || true",
"coverage": "yarn run precoverage && npm run coverage:unit && npm run coverage:e2e && yarn run postcoverage",
"postcoverage": "npm run report:combined # combine jest and cypress coverage reports",
"mkdir:reports": "rm -Rf reports && mkdir reports || true # intermediate script",
"prereport:combined": "npm run combine:reports",
"report:combined": "yarn run prereport:combined && nyc report --reporter lcov --report-dir coverage | exit 0",
"coverage:e2e": "cross-env COVERAGE=1 npm run build && start-server-and-test start:test http://localhost:3000 'COVERAGE=1 cypress run'",
"coverage:unit": "jest --coverage",
"//----- RUN IN VARIOUS ENVIRONMENTS -----": "",
"//_____Docker_____": "",
"start:docker": "docker run -p 3000:3000 --env-file .env.development -it vns:latest",
"build:docker": "docker build -f ./.vn/docker/vn.production.dockerfile -t vulcan-next .",
"test:docker": "docker run --env-file .env.development -it vns-test:latest",
"//_____CodeSandbox____": "",
"init:codesandbox": "[ -f .env.development.local ] || echo 'MONGO_URI=\"mongodb://localhost:27017/vulcan-next-app\"' > .env.development.local",
"//----- CONTRIBUTE -----": "",
"//____Local dev_____": "",
"//link:vulcan": "For linking a local copy of Vulcan NPM monorepo (don't forget to publish in Vulcan NPM first)",
"link:vulcan": "./.vn/scripts/link-vulcan.sh",
"link:vulcan:update": "yalc update",
"upgrade:vulcan": "yarn up '@vulcanjs/*' && yarn run postinstall",
"//upgrade:vulcan1": "Use with Yarn 1",
"upgrade:vulcan1": "yarn upgrade --latest --pattern '@vulcanjs/*'",
"auto-changelog": "auto-changelog -u"
},
"dependencies": {
"@apollo/client": "^3.2.0",
"@emotion/cache": "^11.4.0",
"@emotion/react": "^11.4.1",
"@emotion/server": "^11.4.0",
"@emotion/styled": "^11.3.0",
"@graphql-tools/merge": "^8.2.11",
"@graphql-tools/schema": "^8.3.11",
"@hapi/iron": "6.0.0",
"@mdx-js/loader": "^1.6",
"@mdx-js/react": "^1.6",
"@mui/icons-material": "^5.0.0",
"@mui/material": "^5.0.0",
"@next/mdx": "^12.1.6",
"@vulcanjs/crud": "^0.7.2-alpha.8",
"@vulcanjs/graphql": "^0.8.1-y.0",
"@vulcanjs/mdx": "^0.7.2-alpha.8",
"@vulcanjs/meteor-legacy": "^0.8.1-y.0",
"@vulcanjs/model": "^0.7.2-alpha.8",
"@vulcanjs/mongo": "^0.7.2-alpha.8",
"@vulcanjs/mongo-apollo": "^0.8.1-y.0",
"@vulcanjs/react-hooks": "^0.8.1-y.0",
"@vulcanjs/react-ui": "^0.8.1-y.0",
"@vulcanjs/react-ui-lite": "^0.8.1-y.0",
"@vulcanjs/schema": "^0.7.2-alpha.8",
"apollo-datasource-mongodb": "^0.5.2",
"apollo-server": "3.9",
"apollo-server-core": "3.9",
"apollo-server-express": "3.9",
"babel-jest": "28",
"babel-plugin-istanbul": "6.0.0",
"bcrypt": "^5.0.1",
"clsx": "^1.1.1",
"cors": "^2.8.5",
"cross-env": "7.0.2",
"debug": "4.1.1",
"express": "4.17.1",
"graphql": "15.4.0",
"graphql-tag": "2.10.3",
"gray-matter": "^4.0.2",
"i18next": "^19.4.5",
"i18next-browser-languagedetector": "^4.2.0",
"i18next-http-backend": "^1.0.15",
"lodash": "^4.17.19",
"mongoose": "6",
"nanoid": "^3.1.25",
"next": "^12.1.6",
"next-connect": "^0.9.1",
"next-i18next": "^8.10.0",
"next-mdx-remote": "3",
"next-sitemap": "^1.4.17",
"nodemailer": "^6.6.3",
"passport": "^0.4.1",
"passport-local": "1.0.0",
"polished": "^3.6.5",
"postcss-nested": "^4.2.1",
"querystring": "^0.2.1",
"react": "^17.0.1",
"react-bootstrap-typeahead": "^6.0.0-alpha.4",
"react-cookie": "^4.1.1",
"react-dom": "^17.0.1",
"react-hook-form": "4.9.8",
"react-i18next": "^11.5.0",
"react-spring": "^8.0.27",
"styled-jsx-plugin-postcss": "^3.0.2",
"swr": "^0.4.0"
},
"devDependencies": {
"@babel/core": "^7.10.2",
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@storybook/builder-webpack5": "next",
"@storybook/manager-webpack5": "next",
"@storybook/testing-react": "^1.3.0",
"@types/node": "^13.7.6",
"@types/nodemailer": "^6.4.4",
"@types/react": "^17",
"@types/react-dom": "^17",
"@types/shelljs": "^0.8.8",
"@vercel/ncc": "^0.30.0",
"babel-loader": "^8.1.0",
"babel-plugin-import": "^1.13.3",
"chalk": "^4.1.2",
"eslint": "^7.32.0",
"graphql-voyager": "^1.0.0-rc.31",
"jest-environment-jsdom": "^28.0.2",
"mongodb-memory-server": "^8.4.0",
"react-is": "^16.13.1",
"source-map-support": "^0.5.19",
"storybook-css-modules-preset": "^1.1.1",
"supertest": "^6.1.6",
"ts-loader": "^7.0.5",
"typescript": "=4.3.5",
"webpack": "5",
"yalc": "^1.0.0-pre.53"
},
"optionalDependencies": {
"@cypress/code-coverage": "^3.8.1",
"@cypress/webpack-preprocessor": "^5.4.1",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@next/bundle-analyzer": "^9.4.4",
"@next/plugin-storybook": "^12.2.2",
"@storybook/addon-a11y": "^6.5.9",
"@storybook/addon-actions": "^6.5.9",
"@storybook/addon-backgrounds": "^6.5.9",
"@storybook/addon-controls": "^6.5.9",
"@storybook/addon-docs": "^6.5.9",
"@storybook/addon-essentials": "^6.5.9",
"@storybook/addon-links": "^6.5.9",
"@storybook/addons": "^6.5.9",
"@storybook/react": "^6.5.9",
"@testing-library/cypress": "^8.0.3",
"@testing-library/jest-dom": "^5.9.0",
"@testing-library/react": "^10.2.0",
"@testing-library/react-hooks": "^3.3.0",
"@types/jest": "^25.2.3",
"auto-changelog": "^2.2.1",
"chromatic": "^5.9.2",
"cypress": "^9",
"dotenv-cli": "^4.0.0",
"eslint-config-next": "^11.1.0",
"eslint-plugin-cypress": "2.11.1",
"eslint-plugin-storybook": "^0.6.1",
"jest": "28",
"jest-transformer-mdx": "^2.2.0",
"nyc": "^15.1.0",
"serve": "^11.3.2",
"shelljs": "^0.8.4",
"smtp-tester": "^1.2.0",
"start-server-and-test": "^1.11.0",
"storybook-addon-next-router": "^4.0.0",
"tsup": "^6.0.1"
},
"resolutions": {
"@types/react": "^17.0.16",
"@types/react-dom": "^17.0.16",
"graphql": "15.4.0"
},
"installConfig": {
"hoistingLimits": "dependencies"
}
}