Files
medusa-store/packages/medusa/package.json
Adrien de Peretti 6dc0b8bed8 feat(): Introduce translation module and preliminary application of them (#14189)
* feat(): Translation first steps

* feat(): locale middleware

* feat(): readonly links

* feat(): feature flag

* feat(): modules sdk

* feat(): translation module re export

* start adding workflows

* update typings

* update typings

* test(): Add integration tests

* test(): centralize filters preparation

* test(): centralize filters preparation

* remove unnecessary importy

* fix workflows

* Define StoreLocale inside Store Module

* Link definition to extend Store with supported_locales

* store_locale migration

* Add supported_locales handling in Store Module

* Tests

* Accept supported_locales in Store endpoints

* Add locales to js-sdk

* Include locale list and default locale in Store Detail section

* Initialize local namespace in js-sdk

* Add locales route

* Make code primary key of locale table to facilitate upserts

* Add locales routes

* Show locale code as is

* Add list translations api route

* Batch endpoint

* Types

* New batchTranslationsWorkflow and various updates to existent ones

* Edit default locale UI

* WIP

* Apply translation agnostically

* middleware

* Apply translation agnostically

* fix Apply translation agnostically

* apply translations to product list

* Add feature flag

* fetch translations by batches of 250 max

* fix apply

* improve and test util

* apply to product list

* dont manage translations if no locale

* normalize locale

* potential todo

* Protect translations routes with feature flag

* Extract normalize locale util to core/utils

* Normalize locale on write

* Normalize locale for read

* Use feature flag to guard translations UI across the board

* Avoid throwing incorrectly when locale_code not present in partial updates

* move applyTranslations util

* remove old tests

* fix util tests

* fix(): product end points

* cleanup

* update lock

* remove unused var

* cleanup

* fix apply locale

* missing new dep for test utils

* Change entity_type, entity_id to reference, reference_id

* Remove comment

* Avoid registering translations route if ff not enabled

* Prevent registering express handler for disabled route via defineFileConfig

* Add tests

* Add changeset

* Update test

* fix integration tests, module and internals

* Add locale id plus fixed

* Allow to pass array of reference_id

* fix unit tests

* fix link loading

* fix store route

* fix sales channel test

* fix tests

---------

Co-authored-by: Nicolas Gorga <nicogorga11@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2025-12-08 19:33:08 +01:00

146 lines
4.5 KiB
JSON

{
"name": "@medusajs/medusa",
"version": "2.12.1",
"description": "Building blocks for digital commerce",
"main": "dist/index.js",
"exports": {
"./package.json": "./package.json",
".": "./dist/index.js",
"./types": "./dist/types/index.js",
"./utils": "./dist/utils/index.js",
"./api/*": "./dist/api/*.js",
"./subscribers/*": "./dist/subscribers/*.js",
"./jobs/*": "./dist/jobs/*.js",
"./core-flows": "./dist/core-flows/index.js",
"./loaders/*": "./dist/loaders/*.js",
"./commands/*": "./dist/commands/*.js",
"./feature-flags/*": "./dist/feature-flags/*.js",
"./*": "./dist/modules/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/medusajs/medusa",
"directory": "packages/medusa"
},
"publishConfig": {
"access": "public"
},
"files": [
"dist",
"oas",
"!dist/**/__tests__",
"!dist/**/__mocks__",
"!dist/**/__fixtures__"
],
"engines": {
"node": ">=20"
},
"author": "Sebastian Rindom",
"license": "MIT",
"homepage": "https://medusajs.com",
"llms": "https://docs.medusajs.com/llms.txt",
"llmsFull": "https://docs.medusajs.com/llms-full.txt",
"mcpServer": "https://docs.medusajs.com/mcp",
"scripts": {
"watch": "yarn run -T tsc --build --watch",
"build": "yarn run -T rimraf dist && yarn run -T tsc --build",
"serve": "node dist/app.js",
"test": "../../node_modules/.bin/jest --bail --forceExit --testPathIgnorePatterns='/integration-tests/' --testPathPattern=src",
"test:integration": "../../node_modules/.bin/jest --passWithNoTests --forceExit --testPathPattern=\"src/.*/integration-tests/__tests__/.*\\.ts\""
},
"devDependencies": {
"@medusajs/framework": "2.12.1"
},
"dependencies": {
"@inquirer/checkbox": "^2.3.11",
"@inquirer/input": "^2.2.9",
"@medusajs/admin-bundler": "2.12.1",
"@medusajs/analytics": "2.12.1",
"@medusajs/analytics-local": "2.12.1",
"@medusajs/analytics-posthog": "2.12.1",
"@medusajs/api-key": "2.12.1",
"@medusajs/auth": "2.12.1",
"@medusajs/auth-emailpass": "2.12.1",
"@medusajs/auth-github": "2.12.1",
"@medusajs/auth-google": "2.12.1",
"@medusajs/cache-inmemory": "2.12.1",
"@medusajs/cache-redis": "2.12.1",
"@medusajs/caching": "2.12.1",
"@medusajs/caching-redis": "2.12.1",
"@medusajs/cart": "2.12.1",
"@medusajs/core-flows": "2.12.1",
"@medusajs/currency": "2.12.1",
"@medusajs/customer": "2.12.1",
"@medusajs/draft-order": "2.12.1",
"@medusajs/event-bus-local": "2.12.1",
"@medusajs/event-bus-redis": "2.12.1",
"@medusajs/file": "2.12.1",
"@medusajs/file-local": "2.12.1",
"@medusajs/file-s3": "2.12.1",
"@medusajs/fulfillment": "2.12.1",
"@medusajs/fulfillment-manual": "2.12.1",
"@medusajs/index": "2.12.1",
"@medusajs/inventory": "2.12.1",
"@medusajs/link-modules": "2.12.1",
"@medusajs/locking": "2.12.1",
"@medusajs/locking-postgres": "2.12.1",
"@medusajs/locking-redis": "2.12.1",
"@medusajs/notification": "2.12.1",
"@medusajs/notification-local": "2.12.1",
"@medusajs/notification-sendgrid": "2.12.1",
"@medusajs/order": "2.12.1",
"@medusajs/payment": "2.12.1",
"@medusajs/payment-stripe": "2.12.1",
"@medusajs/pricing": "2.12.1",
"@medusajs/product": "2.12.1",
"@medusajs/promotion": "2.12.1",
"@medusajs/region": "2.12.1",
"@medusajs/sales-channel": "2.12.1",
"@medusajs/settings": "2.12.1",
"@medusajs/stock-location": "2.12.1",
"@medusajs/store": "2.12.1",
"@medusajs/tax": "2.12.1",
"@medusajs/telemetry": "2.12.1",
"@medusajs/translation": "2.12.1",
"@medusajs/user": "2.12.1",
"@medusajs/workflow-engine-inmemory": "2.12.1",
"@medusajs/workflow-engine-redis": "2.12.1",
"boxen": "^5.0.1",
"chalk": "^4.1.2",
"chokidar": "^4.0.3",
"compression": "^1.8.0",
"express": "^4.21.0",
"fs-exists-cached": "^1.0.0",
"jsonwebtoken": "^9.0.2",
"multer": "^2.0.2",
"node-schedule": "^2.1.1",
"qs": "^6.12.1",
"request-ip": "^3.3.0",
"slugify": "^1.6.6",
"uuid": "^9.0.0",
"zod": "3.25.76"
},
"peerDependencies": {
"@medusajs/framework": "2.12.1",
"@swc/core": "^1.7.28",
"posthog-node": "^5.11.0",
"react-dom": "^18.3.1",
"yalc": "^1.0.0-pre.53"
},
"peerDependenciesMeta": {
"@swc/core": {
"optional": true
},
"posthog-node": {
"optional": true
},
"react-dom": {
"optional": true
},
"yalc": {
"optional": true
}
},
"gitHead": "cd1f5afa5aa8c0b15ea957008ee19f1d695cbd2e"
}