Skip to content

Commit

Permalink
Merge pull request #227 from Pinelab-studio/v2-bulk-update-plugin
Browse files Browse the repository at this point in the history
Upgraded Vendure Variant Bulk Update plugin to vendure 2.0
  • Loading branch information
martijnvdbrug authored Jul 26, 2023
2 parents 3b61982 + c2f5758 commit b8b4310
Show file tree
Hide file tree
Showing 6 changed files with 1,394 additions and 4,151 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# 'vendure-plugin-sendcloud',
# 'vendure-plugin-metrics',
# 'vendure-plugin-limit-variant-per-order',
# 'vendure-plugin-variant-bulk-update',
'vendure-plugin-variant-bulk-update',
'vendure-plugin-stripe-subscription',
'vendure-plugin-customer-managed-groups',
'vendure-plugin-picqer',
Expand Down
16 changes: 8 additions & 8 deletions packages/vendure-plugin-variant-bulk-update/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"start": "yarn ts-node test/dev-server.ts",
"serve": "nodemon --watch \"src/**\" --ext \"ts,json\" --exec \"ts-node test/dev-server.ts\"",
"build": "rimraf dist && tsc",
"test": "jest --preset=\"ts-jest\""
"test": "vitest run"
},
"devDependencies": {
"@types/jest": "27.4.1",
"@vendure/admin-ui-plugin": "1.9.5",
"@vendure/core": "1.9.5",
"@vendure/testing": "1.9.5",
"jest": "27.2.0",
"@vendure/admin-ui-plugin": "2.0.4",
"@vendure/core": "2.0.4",
"@vendure/testing": "2.0.4",
"nodemon": "2.0.15",
"ts-jest": "27.0.5",
"ts-node": "10.7.0",
"typescript": "4.3.5"
"typescript": "4.9.5",
"unplugin-swc": "^1.3.2",
"vitest": "^0.30.1",
"@swc/core": "^1.3.59"
},
"gitHead": "89507cfaa85a9fe1fb204f382f6ba730138fcc27"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { TestServer } from '@vendure/testing/lib/test-server';
import { initialData } from '../../test/src/initial-data';
import gql from 'graphql-tag';
import { expect, describe, beforeAll, afterAll, it, vi, test } from 'vitest';
import { VariantBulkUpdatePlugin } from '../src/variant-bulk-update.plugin';

describe('Limit variants per order plugin', function () {
Expand Down
2 changes: 1 addition & 1 deletion packages/vendure-plugin-variant-bulk-update/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"types": ["node", "jest"]
"types": ["node"]
},
"include": ["src/"],
"exclude": ["src/ui"]
Expand Down
22 changes: 22 additions & 0 deletions packages/vendure-plugin-variant-bulk-update/vitest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import path from 'path';
import swc from 'unplugin-swc';
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
include: './test/variant-bulk-update.spec.ts',
},
plugins: [
// SWC required to support decorators used in test plugins
// See https://github.com/vitest-dev/vitest/issues/708#issuecomment-1118628479
// Vite plugin
swc.vite({
jsc: {
transform: {
// See https://github.com/vendure-ecommerce/vendure/issues/2099
useDefineForClassFields: false,
},
},
}),
],
});
Loading

0 comments on commit b8b4310

Please sign in to comment.