Skip to content

Commit 70abaf1

Browse files
committed
refactor(nx): Restructure workspace / monorepo
- Restructure pnpm workspace - Extend ts configs - Update dependencies - Use @nx/eslint/plugin - Use @nx/next/plugin for dev package - Use @nx/js:tsc to build payload-authjs
1 parent eec2088 commit 70abaf1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1355
-1519
lines changed

.gitignore

Lines changed: 4 additions & 247 deletions
Original file line numberDiff line numberDiff line change
@@ -1,258 +1,15 @@
1-
dev/tmp
2-
dev/yarn.lock
3-
dev/.next
4-
dev/pnpm-lock.yaml
5-
6-
# Created by https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
7-
8-
### macOS ###
9-
*.DS_Store
10-
.AppleDouble
11-
.LSOverride
12-
13-
# Thumbnails
14-
._*
15-
16-
# Files that might appear in the root of a volume
17-
.DocumentRevisions-V100
18-
.fseventsd
19-
.Spotlight-V100
20-
.TemporaryItems
21-
.Trashes
22-
.VolumeIcon.icns
23-
.com.apple.timemachine.donotpresent
24-
25-
# Directories potentially created on remote AFP share
26-
.AppleDB
27-
.AppleDesktop
28-
Network Trash Folder
29-
Temporary Items
30-
.apdisk
31-
32-
### Node ###
33-
# Logs
34-
logs
35-
*.log
36-
npm-debug.log*
37-
yarn-debug.log*
38-
yarn-error.log*
39-
40-
# Runtime data
41-
pids
42-
*.pid
43-
*.seed
44-
*.pid.lock
45-
46-
# Directory for instrumented libs generated by jscoverage/JSCover
47-
lib-cov
48-
49-
# Coverage directory used by tools like istanbul
50-
coverage
51-
52-
# nyc test coverage
53-
.nyc_output
54-
55-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
56-
.grunt
57-
58-
# Bower dependency directory (https://bower.io/)
59-
bower_components
60-
61-
# node-waf configuration
62-
.lock-wscript
63-
64-
# Compiled binary addons (http://nodejs.org/api/addons.html)
65-
build/Release
66-
671
# Dependency directories
682
node_modules/
69-
jspm_packages/
70-
71-
# Typescript v1 declaration files
72-
typings/
73-
74-
# Optional npm cache directory
75-
.npm
76-
77-
# Optional eslint cache
78-
.eslintcache
79-
80-
# Optional REPL history
81-
.node_repl_history
82-
83-
# Output of 'npm pack'
84-
*.tgz
85-
86-
# Yarn Integrity file
87-
.yarn-integrity
88-
89-
# Yarn Berry
90-
.yarn/*
91-
!.yarn/patches
92-
!.yarn/plugins
93-
!.yarn/releases
94-
!.yarn/sdks
95-
!.yarn/versions
96-
.pnp.*
973

984
# dotenv environment variables file
995
.env
1006

101-
102-
### SublimeText ###
103-
# cache files for sublime text
104-
*.tmlanguage.cache
105-
*.tmPreferences.cache
106-
*.stTheme.cache
107-
108-
# workspace files are user-specific
109-
*.sublime-workspace
110-
111-
# project files should be checked into the repository, unless a significant
112-
# proportion of contributors will probably not be using SublimeText
113-
# *.sublime-project
114-
115-
# sftp configuration file
116-
sftp-config.json
117-
118-
# Package control specific files
119-
Package Control.last-run
120-
Package Control.ca-list
121-
Package Control.ca-bundle
122-
Package Control.system-ca-bundle
123-
Package Control.cache/
124-
Package Control.ca-certs/
125-
Package Control.merged-ca-bundle
126-
Package Control.user-ca-bundle
127-
oscrypto-ca-bundle.crt
128-
bh_unicode_properties.cache
129-
130-
# Sublime-github package stores a github token in this file
131-
# https://packagecontrol.io/packages/sublime-github
132-
GitHub.sublime-settings
133-
134-
### VisualStudioCode ###
135-
.vscode/*
136-
!.vscode/tasks.json
137-
!.vscode/launch.json
138-
!.vscode/extensions.json
139-
.history
140-
141-
### WebStorm ###
142-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
143-
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
144-
145-
.idea/*
146-
# User-specific stuff:
147-
.idea/**/workspace.xml
148-
.idea/**/tasks.xml
149-
.idea/dictionaries
150-
151-
# Sensitive or high-churn files:
152-
.idea/**/dataSources/
153-
.idea/**/dataSources.ids
154-
.idea/**/dataSources.xml
155-
.idea/**/dataSources.local.xml
156-
.idea/**/sqlDataSources.xml
157-
.idea/**/dynamic.xml
158-
.idea/**/uiDesigner.xml
159-
160-
# Gradle:
161-
.idea/**/gradle.xml
162-
.idea/**/libraries
163-
164-
# CMake
165-
cmake-build-debug/
166-
167-
# Mongo Explorer plugin:
168-
.idea/**/mongoSettings.xml
169-
170-
## File-based project format:
171-
*.iws
172-
173-
## Plugin-specific files:
174-
175-
# IntelliJ
176-
/out/
177-
178-
# mpeltonen/sbt-idea plugin
179-
.idea_modules/
180-
181-
# JIRA plugin
182-
atlassian-ide-plugin.xml
183-
184-
# Cursive Clojure plugin
185-
.idea/replstate.xml
186-
187-
# Ruby plugin and RubyMine
188-
/.rakeTasks
189-
190-
# Crashlytics plugin (for Android Studio and IntelliJ)
191-
com_crashlytics_export_strings.xml
192-
crashlytics.properties
193-
crashlytics-build.properties
194-
fabric.properties
195-
196-
### WebStorm Patch ###
197-
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
198-
199-
# *.iml
200-
# modules.xml
201-
# .idea/misc.xml
202-
# *.ipr
203-
204-
# Sonarlint plugin
205-
.idea/sonarlint
206-
207-
### Windows ###
208-
# Windows thumbnail cache files
209-
Thumbs.db
210-
ehthumbs.db
211-
ehthumbs_vista.db
212-
213-
# Folder config file
214-
Desktop.ini
215-
216-
# Recycle Bin used on file shares
217-
$RECYCLE.BIN/
218-
219-
# Windows Installer files
220-
*.cab
221-
*.msi
222-
*.msm
223-
*.msp
224-
225-
# Windows shortcuts
226-
*.lnk
227-
228-
# End of https://www.gitignore.io/api/node,macos,windows,webstorm,sublimetext,visualstudiocode
229-
230-
# Ignore all uploads
231-
demo/upload
232-
demo/media
233-
demo/files
234-
235-
# Ignore build folder
236-
build
237-
238-
# Ignore built components
239-
components/index.js
240-
components/styles.css
241-
242-
# Ignore generated
243-
dev/generated-types.ts
244-
dev/generated-schema.graphql
245-
246-
# Ignore dist, no need for git
7+
# Ignore dist
2478
dist
2489

249-
dev/src/uploads
250-
251-
10+
# Next.js
11+
.next
25212

13+
# Nx
25314
.nx/cache
25415
.nx/workspace-data
255-
256-
# Next.js
257-
.next
258-
out

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.nx/cache
2+
/.nx/workspace-data

dev/next.config.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

dev/project.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"plugin": "@nx/eslint/plugin",
77
"options": {
8-
"targetName": "eslint:lint"
8+
"targetName": "lint"
99
}
1010
},
1111
{

package.json

Lines changed: 14 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,26 @@
11
{
2-
"name": "payload-authjs",
2+
"name": "payload-authjs-monorepo",
33
"version": "0.4.0",
4+
"private": true,
45
"type": "module",
5-
"description": "A Payload CMS 3 plugin for Auth.js 5",
6-
"repository": "git@github.com:CrawlerCode/payload-authjs.git",
7-
"author": "crawlercode@outlook.de",
8-
"license": "MIT",
9-
"main": "dist/index.js",
10-
"types": "dist/index.d.ts",
11-
"exports": {
12-
".": {
13-
"types": "./dist/index.d.ts",
14-
"import": "./dist/index.js",
15-
"default": "./dist/index.js"
16-
},
17-
"./middleware": {
18-
"types": "./dist/payload/middleware.d.ts",
19-
"import": "./dist/payload/middleware.js",
20-
"default": "./dist/payload/middleware.js"
21-
},
22-
"./components": {
23-
"types": "./dist/components/index.d.ts",
24-
"import": "./dist/components/index.js",
25-
"default": "./dist/components/index.js"
26-
}
27-
},
28-
"files": [
29-
"dist"
30-
],
31-
"keywords": [
32-
"payload",
33-
"cms",
34-
"payloadcms",
35-
"plugin",
36-
"typescript",
37-
"react",
38-
"auth.js",
39-
"next-auth"
40-
],
416
"scripts": {
42-
"dev": "nx --project payload-authjs-dev run dev",
43-
"build": "tsc",
44-
"lint": "eslint .",
45-
"lint:fix": "eslint . --fix"
46-
},
47-
"peerDependencies": {
48-
"@payloadcms/next": "^3.0.0",
49-
"@payloadcms/ui": "^3.0.0",
50-
"next": "^15.0.0",
51-
"next-auth": "^5.0.0-beta.25",
52-
"payload": "^3.0.0"
7+
"build": "nx run payload-authjs:build",
8+
"dev": "nx run dev:dev"
539
},
10+
"dependencies": {},
5411
"devDependencies": {
55-
"@nx/eslint": "20.0.6",
56-
"@nx/js": "20.0.6",
57-
"@nx/next": "20.0.6",
12+
"@nx/eslint": "20.3.2",
13+
"@nx/js": "20.3.2",
14+
"@nx/next": "20.3.2",
15+
"@nx/react": "20.3.2",
5816
"@payloadcms/eslint-config": "3.9.0",
59-
"@types/react": "19.0.7",
60-
"next": "15.1.5",
61-
"next-auth": "5.0.0-beta.25",
62-
"nx": "20.0.6",
63-
"payload": "3.18.0",
17+
"nx": "20.3.2",
6418
"prettier": "^3.4.2",
65-
"react": "19.0.0",
66-
"react-dom": "19.0.0",
6719
"typescript": "^5.7.3"
6820
},
6921
"nx": {},
70-
"dependencies": {},
71-
"packageManager": "pnpm@9.12.3"
22+
"workspaces": [
23+
"packages/*"
24+
],
25+
"packageManager": "pnpm@9.15.4"
7226
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)