feat(admin-sdk,admin-bundler,admin-shared,medusa): Restructure admin packages (#8988)

**What**
- Renames /admin-next -> /admin
- Renames @medusajs/admin-sdk -> @medusajs/admin-bundler
- Creates a new package called @medusajs/admin-sdk that will hold all tooling relevant to creating admin extensions. This is currently `defineRouteConfig` and `defineWidgetConfig`, but will eventually also export methods for adding custom fields, register translation, etc. 
  - cc: @shahednasser we should update the examples in the docs so these functions are imported from `@medusajs/admin-sdk`. People will also need to install the package in their project, as it's no longer a transient dependency.
  - cc: @olivermrbl we might want to publish a changelog when this is merged, as it is a breaking change, and will require people to import the `defineXConfig` from the new package instead of `@medusajs/admin-shared`.
- Updates CODEOWNERS so /admin packages does not require a review from the UI team.
This commit is contained in:
Kasper Fabricius Kristensen authored and GitHub committed 2024-09-04 19:00:25 +00:00
1 parent beaa851302
commit 0fe1201435
1440 files changed
+122 -86

No files matched your search

+8 -56
View File
@@ -81,10 +81,11 @@ module.exports = {
project: [
"./packages/medusa/tsconfig.json",
"./packages/admin-next/dashboard/tsconfig.json",
"./packages/admin-next/admin-sdk/tsconfig.json",
"./packages/admin-next/admin-shared/tsconfig.json",
"./packages/admin-next/admin-vite-plugin/tsconfig.json",
"./packages/admin/dashboard/tsconfig.json",
"./packages/admin/admin-sdk/tsconfig.json",
"./packages/admin/admin-shared/tsconfig.json",
"./packages/admin/admin-bundler/tsconfig.json",
"./packages/admin/admin-vite-plugin/tsconfig.json",
"./packages/cli/create-medusa-app/tsconfig.json",
"./packages/cli/medusa-cli/tsconfig.spec.json",
@@ -218,8 +219,8 @@ module.exports = {
},
{
files: [
"packages/admin-next/dashboard/**/*.ts",
"packages/admin-next/dashboard/**/*.tsx",
"packages/admin/dashboard/**/*.ts",
"packages/admin/dashboard/**/*.tsx",
],
plugins: ["unused-imports", "react-refresh"],
extends: [
@@ -234,56 +235,7 @@ module.exports = {
},
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
project: "./packages/admin-next/dashboard/tsconfig.json",
},
globals: {
__BASE__: "readonly",
},
env: {
browser: true,
},
rules: {
"prettier/prettier": "error",
"react/prop-types": "off",
"new-cap": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
"no-unused-expressions": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
},
},
{
files: [
"packages/admin-next/app/**/*.ts",
"packages/admin-next/app/**/*.tsx",
],
plugins: ["unused-imports", "react-refresh"],
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: "module", // Allows for the use of imports
project: "./packages/admin-next/app/tsconfig.json",
project: "./packages/admin/dashboard/tsconfig.json",
},
globals: {
__BASE__: "readonly",