{{ message }}
chore(users-permissions): move server code into server/src#26105
Open
unrevised6419 wants to merge 2 commits intostrapi:developfrom
Open
chore(users-permissions): move server code into server/src#26105unrevised6419 wants to merge 2 commits intostrapi:developfrom
unrevised6419 wants to merge 2 commits intostrapi:developfrom
Conversation
Align plugin folder structure with all other packages/plugins/* which
use an admin/src + server/src split. The users-permissions server
tree previously lived at the package root under server/ — an outlier.
Precursor to adding TypeScript support, which is in turn required to
drop React propTypes/defaultProps usage in the admin side (both
removed from function components in React 19).
- Move packages/plugins/users-permissions/server/* → server/src/*
- Update package.json exports["./strapi-server"].source
- Update rollup.config.mjs input + rootDir
- Adjust one relative path in server/src/services/__tests__/jwt.test.js
that reached tests/helpers at repo root (now one level deeper)
No runtime or behavior changes. Jest coverage glob already uses
server/**/*.{js,ts} which continues to match recursively.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Follow-up to the server → server/src rename: update stale path references in the sessions-and-jwt auth doc and the documentation plugin README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
packages/plugins/users-permissions/server/*→server/src/*so the plugin matches theadmin/src+server/srclayout used by every other plugin inpackages/plugins/(color-picker, i18n, graphql, sentry, cloud, documentation).package.jsonexports["./strapi-server"].sourceandrollup.config.mjsinput+rootDir.server/src/services/__tests__/jwt.test.jsthat reachedtests/helpers/at the repo root (now one level deeper).docs/.../00-sessions-and-jwt.md,packages/plugins/documentation/README.md).Why
Precursor to adding TypeScript support to the
users-permissionsplugin. TypeScript is in turn needed to drop ReactpropTypes/defaultPropsusage in the admin side — both removed from function components in React 19. Normalizing the folder layout first avoids entrenching the odd structure inside new TS tooling configs (tsconfig, rollup, jest).No runtime or behavior changes. All server files were moved with
git mv(R100 — identical content). The jest coverage globserver/**/*.{js,ts}continues to match recursively.Conflict surface with open PRs
Swept all 218 open PRs; 16 touch
packages/plugins/users-permissions/. The 8 that touch the renamedserver/*paths will need rebase + path remap. Staleness snapshot (as of 2026-04-23):Will need rebase (touch
server/*)server/controllers/auth.jsserver/controllers/validation/__tests__/auth.test.jsserver/controllers/auth.jsserver/middlewares/rateLimit.jsserver/routes/content-api/auth.jsserver/controllers/user.jsserver/controllers/user.js+ graphql mutations +services/user.jsserver/bootstrap/index.js+server/controllers/auth.js+ adminUnaffected by rename (admin-only or
package.jsononly)package.jsonpackage.jsonadmin/src/tests/setup.js+package.jsonadmin/src/pages/**admin/src/translations/zh-Hans.jsonadmin/src/translations/sk.jsonadmin/src/translations/cs.jsonadmin/src/translations/da.jsonpackage.json(pnpm PoC)Note: my
package.jsonchange touches onlyexports["./strapi-server"].source; expect trivial conflicts with the dep-bump / release PRs (#26103, #26100, #26065, #25766) that modifydependencies.Test plan
Plugin-scoped (
@strapi/plugin-users-permissions):yarn workspace @strapi/plugin-users-permissions build— rollup emitsdist/admin+dist/serverfrom newserver/srcrootyarn workspace @strapi/plugin-users-permissions test:unit— 43/43 pass (4 suites:jwt,email-template,auth,utils/index)yarn workspace @strapi/plugin-users-permissions test:front:ce— 45/45 pass (18 suites)yarn workspace @strapi/plugin-users-permissions lint— 0 errors (6 pre-existingfunc-nameswarnings inserver/src/controllers/validation/auth.js, unrelated to rename)Monorepo-wide (sanity: rename doesn't break neighbouring workspaces):
yarn test:unit:all— 25 nx projects passyarn test:front:all:ce— 5 nx projects passRuntime verification:
require('@strapi/plugin-users-permissions/strapi-server')resolves correctly in both source and builtdist/consumers (theexports["./strapi-server"]map coverssource,import,require,default— onlysourcechanged)Left for CI:
🤖 Generated with Claude Code