Skip to content

Commit

Permalink
Merge branch 'develop' into fix/duplicate-coupon-product-id-rule
Browse files Browse the repository at this point in the history
  • Loading branch information
olivermrbl authored Feb 2, 2024
2 parents 91789a8 + 8cbf6c6 commit 4649a17
Show file tree
Hide file tree
Showing 255 changed files with 9,469 additions and 7,225 deletions.
6 changes: 6 additions & 0 deletions .changeset/healthy-ligers-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@medusajs/ui-preset": patch
"@medusajs/ui": patch
---

feat(ui,ui-preset): Update to latest version of TailwindCSS. Increase spacing between columns in <Table /> component.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ packages/*
!packages/medusa
!packages/admin-ui
!packages/admin
!packages/admin-next
!packages/admin-next/dashboard
!packages/medusa-payment-stripe
!packages/medusa-payment-paypal
!packages/event-bus-redis
Expand Down
43 changes: 36 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ module.exports = {
node: true,
jest: true,
},
ignorePatterns: ["packages/admin-next/dashboard/**/dist"],
overrides: [
{
files: ["*.ts"],
Expand All @@ -86,6 +85,7 @@ module.exports = {
"./packages/medusa-payment-paypal/tsconfig.spec.json",
"./packages/admin-ui/tsconfig.json",
"./packages/admin-ui/tsconfig.spec.json",
"./packages/admin-next/dashboard/tsconfig.json",
"./packages/event-bus-local/tsconfig.spec.json",
"./packages/event-bus-redis/tsconfig.spec.json",
"./packages/medusa-plugin-meilisearch/tsconfig.spec.json",
Expand Down Expand Up @@ -228,23 +228,52 @@ module.exports = {
},
},
{
files: ["packages/admin-next/dashboard/src/**/*.{ts,tsx}"],
env: { browser: true, es2020: true, node: true },
files: [
"packages/admin-next/dashboard/**/*.ts",
"packages/admin-next/dashboard/**/*.tsx",
],
plugins: ["unused-imports", "react-refresh"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
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/dashboard/tsconfig.json",
},
globals: {
__BASE__: "readonly",
},
env: {
browser: true,
},
plugins: ["react-refresh"],
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: "^_",
},
],
},
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { IAuthModuleService, ICustomerModuleService } from "@medusajs/types"
import { initDb, useDb } from "../../../../environment-helpers/use-db"

import { ModuleRegistrationName } from "@medusajs/modules-sdk"
import { ICustomerModuleService, IAuthModuleService } from "@medusajs/types"
import adminSeeder from "../../../../helpers/admin-seeder"
import { getContainer } from "../../../../environment-helpers/use-container"
import path from "path"
import { startBootstrapApp } from "../../../../environment-helpers/bootstrap-app"
import { useApi } from "../../../../environment-helpers/use-api"
import { getContainer } from "../../../../environment-helpers/use-container"
import { initDb, useDb } from "../../../../environment-helpers/use-db"
import adminSeeder from "../../../../helpers/admin-seeder"

jest.setTimeout(50000)

Expand Down Expand Up @@ -49,6 +50,7 @@ describe("POST /store/customers", () => {
const authUser = await authService.createAuthUser({
entity_id: "store_user",
provider_id: "test",
scope: "store",
})
const jwt = await authService.generateJwtToken(authUser.id, "store")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,26 @@ import { createAuthenticatedCustomer } from "../../../helpers/create-authenticat

const env = { MEDUSA_FF_MEDUSA_V2: true }

jest.setTimeout(100000)

describe("GET /store/customers/me/addresses", () => {
let dbConnection
let appContainer
let shutdownServer
let customerModuleService: ICustomerModuleService

beforeAll(async () => {
const cwd = path.resolve(path.join(__dirname, "..", "..", ".."))
dbConnection = await initDb({ cwd, env } as any)
shutdownServer = await startBootstrapApp({ cwd, env })
appContainer = getContainer()
customerModuleService = appContainer.resolve(
ModuleRegistrationName.CUSTOMER
)
try {
const cwd = path.resolve(path.join(__dirname, "..", "..", ".."))
dbConnection = await initDb({ cwd, env } as any)
shutdownServer = await startBootstrapApp({ cwd, env })
appContainer = getContainer()
customerModuleService = appContainer.resolve(
ModuleRegistrationName.CUSTOMER
)
} catch (error) {
console.error(error)
}
})

afterAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ import {
simpleProductFactory,
simpleRegionFactory,
} from "../../../../factories"

import { PricingModuleService } from "@medusajs/pricing"
import { ProductModuleService } from "@medusajs/product"
import { AxiosInstance } from "axios"
import path from "path"
import { startBootstrapApp } from "../../../../environment-helpers/bootstrap-app"
import adminSeeder from "../../../../helpers/admin-seeder"
import { createDefaultRuleTypes } from "../../../helpers/create-default-rule-types"
import { ProductModuleService } from "@medusajs/product"
import { PricingModuleService } from "@medusajs/pricing"

jest.setTimeout(50000)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { startBootstrapApp } from "../../../../environment-helpers/bootstrap-app
import { getContainer } from "../../../../environment-helpers/use-container"
import { initDb, useDb } from "../../../../environment-helpers/use-db"

jest.setTimeout(30000)
jest.setTimeout(50000)

describe("CreateProduct workflow", function () {
let medusaContainer
Expand Down Expand Up @@ -129,7 +129,7 @@ describe("CreateProduct workflow", function () {

expect(product).toEqual(
expect.objectContaining({
deleted_at: expect.any(String),
deleted_at: expect.any(Date),
})
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const createAuthenticatedCustomer = async (
const authUser = await authService.createAuthUser({
entity_id: "store_user",
provider_id: "test",
scope: "store",
app_metadata: { customer_id: customer.id },
})

Expand Down
4 changes: 3 additions & 1 deletion packages/admin-next/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@medusajs/icons": "workspace:^",
"@medusajs/ui": "workspace:^",
"@radix-ui/react-collapsible": "1.0.3",
"@radix-ui/react-hover-card": "^1.0.7",
"@tanstack/react-query": "4.22.0",
"@tanstack/react-table": "8.10.7",
"@uiw/react-json-view": "2.0.0-alpha.10",
Expand All @@ -43,13 +44,14 @@
"@medusajs/types": "workspace:^",
"@medusajs/ui-preset": "workspace:^",
"@medusajs/vite-plugin-extension": "workspace:^",
"@types/node": "^20.11.15",
"@types/react": "18.2.43",
"@types/react-dom": "18.2.17",
"@vitejs/plugin-react": "4.2.1",
"autoprefixer": "10.4.16",
"postcss": "8.4.32",
"prettier": "^3.1.1",
"tailwindcss": "3.3.6",
"tailwindcss": "^3.4.1",
"typescript": "5.2.2",
"vite": "5.0.10"
},
Expand Down
35 changes: 34 additions & 1 deletion packages/admin-next/dashboard/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"pages": "pages",
"next": "Next",
"prev": "Prev",
"is": "is",
"extensions": "Extensions",
"settings": "Settings",
"general": "General",
Expand All @@ -35,6 +36,8 @@
"remove": "Remove",
"admin": "Admin",
"store": "Store",
"items_one": "{{count}} item",
"items_other": "{{count}} items",
"countSelected": "{{count}} selected",
"plusCountMore": "+ {{count}} more",
"areYouSure": "Are you sure?",
Expand Down Expand Up @@ -107,7 +110,29 @@
"deleteCustomerGroupWarning": "You are about to delete the customer group {{name}}. This action cannot be undone."
},
"orders": {
"domain": "Orders"
"domain": "Orders",
"paymentStatusLabel": "Payment Status",
"paymentStatus": {
"notPaid": "Not Paid",
"awaiting": "Awaiting",
"captured": "Captured",
"partiallyRefunded": "Partially Refunded",
"refunded": "Refunded",
"canceled": "Canceled",
"requresAction": "Requires Action"
},
"fulfillmentStatusLabel": "Fulfillment Status",
"fulfillmentStatus": {
"notFulfilled": "Not Fulfilled",
"partiallyFulfilled": "Partially Fulfilled",
"fulfilled": "Fulfilled",
"partiallyShipped": "Partially Shipped",
"shipped": "Shipped",
"partiallyReturned": "Partially Returned",
"returned": "Returned",
"canceled": "Canceled",
"requresAction": "Requires Action"
}
},
"draftOrders": {
"domain": "Draft Orders"
Expand Down Expand Up @@ -263,6 +288,14 @@
"total": "Total",
"created": "Created",
"key": "Key",
"customer": "Customer",
"date": "Date",
"order": "Order",
"fulfillment": "Fulfillment",
"payment": "Payment",
"items": "Items",
"salesChannel": "Sales Channel",
"region": "Region",
"role": "Role",
"sent": "Sent"
}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 4649a17

Please sign in to comment.