chore: improve ci pipeline (#1764)

* fix: caching deps + add true parallelization to integration tests api

* fix: github action

* chore: upgrade to yarn berry (#1762)

* init migration

* remove: yarn.lock from all pkgs

* fix: build script in pkgs

* adjust yarn config

* fix: yarn.lock and yarnrc.yml

* fix: github actions

* fix: wrong type

* fix (medusa-react): use dts-cli instead of tsdx

* fix: yarn.lock

* fix: yarn v

* fix: prepare script

* add: comment on why we need to downgrade yarn before medusa-dev

* chore: move to Turborepo (#1763)

* increase number of parallel nodes

* fix (medusa-fulfillment-webshipper): build script

* fix: use new version of medusa-dev

* fix: rename cache-bootstrap to cache-deps
This commit is contained in:
Zakaria El Asri
2022-07-10 11:11:11 +01:00
committed by GitHub
parent 6715eb11de
commit 9fa4238ee4
79 changed files with 54577 additions and 318956 deletions

View File

@@ -1,33 +0,0 @@
name: cache-bootstrap
description: Creates a cache with the given extension for lerna packages
inputs:
extension:
description: Extension for cache name
partial:
description: Boolean flag to describe whether or not to run a partial bootstrap when finding cache
default: false
runs:
using: composite
steps:
# for always overriding cache, use: pat-s/always-upload-cache@v2.1.5
- uses: actions/cache@v2
id: cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{inputs.extension}}-v8-${{ hashFiles('**/yarn.lock') }}
# We want to only bootstrap and install if no cache is found.
# Futhermore, we might want to do a partial, hoisted, bootstrap towards
# the base branch if it exists, otherwise we choose develop for this.
# yarn install --frozen-lockfile
- run: |
if [[ "${{steps.cache.outputs.cache-hit}}" != "true" || "${{inputs.partial}}" != "true" ]]; then
yarn install --frozen-lockfile
yarn bootstrap --concurrency=2
elif [[ "${{inputs.partial}}" = "true" ]]; then
[[ ! -z "${GITHUB_BASE_REF}" ]] && ref="${GITHUB_BASE_REF#refs/heads/}" || ref="develop"
yarn bootstrap --npm-client=npm --hoist --since "origin/${ref}...HEAD" --concurrency=2
fi
shell: bash

23
.github/actions/cache-deps/action.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: cache-deps
description: Creates a cache with the given extension for monorepo dependencies
inputs:
extension:
description: Extension for cache name
runs:
using: composite
steps:
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{inputs.extension}}-v8-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-${{inputs.extension}}-v8
# We want to only bootstrap and install if no cache is found.
- run: |
if [[ "${{steps.cache.outputs.cache-hit}}" != "true" ]]; then
yarn install --immutable
fi
shell: bash

View File

@@ -24,8 +24,8 @@ runs:
node-version: ${{ inputs.node-version }}
cache: "yarn"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: ${{ inputs.cache-extension }}

View File

@@ -8,6 +8,9 @@ on:
jobs:
unit-tests:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
@@ -28,8 +31,8 @@ jobs:
- name: Assert changed
run: ./scripts/assert-changed-files-actions.sh "packages"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: unit-tests
@@ -41,6 +44,9 @@ jobs:
integration-tests-api:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
services:
redis:
@@ -65,6 +71,10 @@ jobs:
ports:
- 5432:5432
strategy:
matrix:
node: [0, 1, 2, 3]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
@@ -82,35 +92,50 @@ jobs:
node-version: "14"
cache: "yarn"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: integration-tests
- name: Build Packages
run: lerna run build
run: yarn build
- name: Install dev cli
run: sudo npm i -g medusa-dev-cli
run: sudo npm i -g medusa-dev-cli@latest
- name: Set path to medusa repo
run: medusa-dev --set-path-to-repo `pwd`
- name: Force install API
run: medusa-dev --force-install
- name: Set npm registry
run: |
yarn config set npmRegistryServer http://localhost:4873
echo -e 'unsafeHttpWhitelist:\n - "localhost"' >> .yarnrc.yml
- name: Force install
run: medusa-dev --force-install --external-registry
working-directory: integration-tests/api
- name: Build integration tests
run: yarn build
working-directory: integration-tests/api
- name: Run API integration tests
run: yarn test:integration:api --maxWorkers=50% --silent=false
- name: Split tests
id: split-tests
run: echo "::set-output name=split::$(npx jest --listTests --json | jq -cM '[_nwise(length / 4 | ceil)]')"
working-directory: integration-tests/api
- name: Run integration tests
run: echo $SPLIT | jq '.[${{ matrix.node }}] | .[] | @text' | xargs yarn test --maxWorkers=50%
working-directory: integration-tests/api
env:
DB_PASSWORD: postgres
SPLIT: ${{ steps['split-tests'].outputs['split'] }}
integration-tests-plugins:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
services:
postgres:
@@ -143,13 +168,13 @@ jobs:
node-version: "14"
cache: "yarn"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: integration-tests
- name: Build Packages
run: lerna run build
run: yarn build
- name: Install dev cli
run: sudo npm i -g medusa-dev-cli
@@ -157,8 +182,13 @@ jobs:
- name: Set path to medusa repo
run: medusa-dev --set-path-to-repo `pwd`
- name: Set npm registry
run: |
yarn config set npmRegistryServer http://localhost:4873
echo -e 'unsafeHttpWhitelist:\n - "localhost"' >> .yarnrc.yml
- name: Force install
run: medusa-dev --force-install
run: medusa-dev --force-install --external-registry
working-directory: integration-tests/plugins
- name: Build plugin integration tests

View File

@@ -1,8 +1,8 @@
name: Generate References
on:
on:
push:
branches:
- 'master'
- "master"
paths:
- packages/medusa/src/services/**
jobs:
@@ -24,9 +24,9 @@ jobs:
with:
node-version: "14"
cache: "yarn"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
- name: Install packages
uses: ./.github/actions/cache-deps
with:
extension: unit-tests
@@ -37,7 +37,7 @@ jobs:
run: yarn generate:services
- uses: stefanzweifel/git-auto-commit-action@v4
with:
with:
commit_message: Automatically Generated Services Reference
file_pattern: docs/content/*
skip_dirty_check: false

View File

@@ -82,8 +82,8 @@ jobs:
node-version: 16.x
cache: "yarn"
- name: Bootstrap packages
uses: ./.github/actions/cache-bootstrap
- name: Install dependencies
uses: ./.github/actions/cache-deps
with:
extension: snapshot-this

View File

@@ -50,7 +50,7 @@ jobs:
cache-extension: "cli-test"
- name: Install Medusa cli
run: yarn global add @medusajs/medusa-cli
run: npm i -g @medusajs/medusa-cli
- name: Create Medusa project
run: |

11
.gitignore vendored
View File

@@ -1,8 +1,17 @@
node_modules
*yarn-error.log
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.DS_Store
lerna-debug.log
.eslintcache
.idea
.idea
.turbo
build/**

File diff suppressed because one or more lines are too long

786
.yarn/releases/yarn-3.2.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1,2 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1

7
.yarnrc.yml Normal file
View File

@@ -0,0 +1,7 @@
yarnPath: .yarn/releases/yarn-3.2.1.cjs
nodeLinker: "node-modules"
nmMode: "hardlinks-global"
enableGlobalCache: true
compressionLevel: 0
checksumBehavior: "ignore"

View File

@@ -0,0 +1,4 @@
npmRegistryServer: "http://localhost:4873"
unsafeHttpWhitelist:
- localhost

View File

@@ -8,16 +8,16 @@
"build": "babel src -d dist --extensions \".ts,.js\""
},
"dependencies": {
"@medusajs/medusa": "1.3.2-dev-1655728455189",
"@medusajs/medusa": "1.3.3-dev-1657050014476",
"faker": "^5.5.3",
"medusa-interfaces": "1.3.0-dev-1655728455189",
"medusa-interfaces": "1.3.1-dev-1657050014476",
"typeorm": "^0.2.31"
},
"devDependencies": {
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"@babel/node": "^7.12.10",
"babel-preset-medusa-package": "1.1.19-dev-1655728455189",
"babel-preset-medusa-package": "1.1.19-dev-1657050014476",
"jest": "^26.6.3"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -44,6 +44,7 @@
"prettier": "^2.1.1",
"resolve-cwd": "^3.0.0",
"ts-jest": "^26.5.6",
"turbo": "^1.3.1",
"typedoc": "^0.22.15",
"typedoc-plugin-markdown": "^3.12.1",
"typeorm": "^0.2.31"
@@ -57,10 +58,10 @@
"hooks:uninstall": "husky uninstall",
"publish:next": "lerna publish --canary --preid next --dist-tag next",
"bootstrap": "lerna bootstrap",
"build": "lerna run build",
"build": "turbo run build",
"lint": "eslint --ext .js,.jsx,.ts,.tsx .",
"jest": "jest",
"test": "jest",
"test": "turbo run test",
"prettier": "prettier",
"test:integration": "jest --config=integration-tests/jest.config.js",
"test:integration:api": "jest --config=integration-tests/jest.config.js --projects=integration-tests/api",
@@ -77,7 +78,5 @@
"oas-normalize": "^5.0.1",
"swagger-inline": "^3.2.2"
},
"resolutions": {
"**/tsdx/typescript": "^4.5.0"
}
"packageManager": "yarn@3.2.1"
}

View File

@@ -3,7 +3,7 @@
"version": "0.1.0",
"description": "Gatsby source plugin for building websites using Medusa Commerce as a data source",
"scripts": {
"test": "jest --watchAll",
"test": "jest --passWithNoTests",
"watch": "tsc-watch --outDir .",
"build": "tsc --outDir ."
},

View File

@@ -7,7 +7,10 @@ import {
SourceNodesArgs,
Store,
} from "gatsby"
import { createRemoteFileNode } from "gatsby-source-filesystem"
import {
createRemoteFileNode,
CreateRemoteFileNodeArgs,
} from "gatsby-source-filesystem"
import { makeSourceFromOperation } from "./make-source-from-operation"
import { createOperations } from "./operations"
@@ -177,7 +180,7 @@ export async function onCreateNode({
cache,
store,
reporter,
})
} as CreateRemoteFileNodeArgs)
if (thumbnailNode) {
createNodeField({
@@ -198,7 +201,7 @@ export async function onCreateNode({
cache,
store,
reporter,
})
} as CreateRemoteFileNodeArgs)
if (imageNode) {
createNodeField({

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,7 @@
"scripts": {
"test": "jest",
"build": "babel src --out-dir dist/ --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir dist/ --ignore **/__tests__"
},
"author": "Sebastian Rindom",

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@
"scripts": {
"test": "jest",
"build": "tsc --build",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir dist/ --ignore **/__tests__"
},
"author": "Sebastian Rindom",

File diff suppressed because it is too large Load Diff

View File

@@ -26,10 +26,13 @@
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"babel-preset-medusa-package": "^1.1.19",
"cross-env": "^7.0.3"
"cross-env": "^7.0.3",
"jest": "^25.5.2"
},
"homepage": "https://github.com/medusajs/medusa/tree/master/packages/medusa-dev-cli#readme",
"keywords": ["medusa"],
"keywords": [
"medusa"
],
"license": "MIT",
"main": "index.js",
"repository": {
@@ -38,10 +41,10 @@
"directory": "packages/medusa-dev-cli"
},
"scripts": {
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "babel src --out-dir dist",
"test": "jest",
"watch": "babel -w src --out-dir dist"
"watch": "babel -w src --out-dir dist",
"test": "jest --passWithNoTests"
},
"engines": {
"node": ">=12.13.0"

File diff suppressed because it is too large Load Diff

View File

@@ -27,9 +27,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir .",
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -28,9 +28,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir .",
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -28,9 +28,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir .",
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -23,10 +23,10 @@
"jest": "^25.5.2"
},
"scripts": {
"test": "jest",
"test": "jest --passWithNoTests",
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__"
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir ."
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -26,8 +26,8 @@
},
"scripts": {
"test": "jest",
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"build": "babel src -d . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"peerDependencies": {

View File

@@ -10,7 +10,7 @@
},
"scripts": {
"build": "tsc --build",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir dist/ --ignore **/__tests__",
"test": "jest"
},

View File

@@ -0,0 +1,7 @@
module.exports = {
transform: {
"^.+\\.(t|j)sx?$": require.resolve("ts-jest"),
},
testRegex: "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
}

View File

@@ -1,7 +0,0 @@
{
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
},
"testRegex": "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
}

View File

@@ -9,8 +9,8 @@
],
"scripts": {
"build": "tsc --build",
"test": "jest --config jestconfig.json",
"prepare": "cross-env NODE_ENV=production npm run build"
"prepare": "cross-env NODE_ENV=production yarn run build",
"test": "jest --passWithNoTests"
},
"author": "Oliver Juhl",
"license": "MIT",

File diff suppressed because it is too large Load Diff

View File

@@ -28,9 +28,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir .",
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -28,7 +28,7 @@
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

File diff suppressed because it is too large Load Diff

View File

@@ -28,10 +28,10 @@
"medusa-test-utils": "^1.1.37"
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "babel src -d .",
"watch": "babel -w src --out-dir .",
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -30,10 +30,10 @@
"medusa-test-utils": "^1.1.37"
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__,**/__mocks__",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__,**/__mocks__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "babel src -d . --ignore **/__tests__",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -30,7 +30,7 @@
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

View File

@@ -12,9 +12,9 @@
"license": "MIT",
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x",

File diff suppressed because it is too large Load Diff

View File

@@ -33,7 +33,7 @@
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

View File

@@ -27,7 +27,7 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

View File

@@ -27,9 +27,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -27,9 +27,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,10 @@
"directory": "packages/medusa-plugin-ip-lookup"
},
"scripts": {
"build": "babel src --out-dir . --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "babel src --out-dir .",
"watch": "babel -w src --out-dir .",
"test": "jest --passWithNoTests"
},
"author": "Oliver Juhl",
"license": "MIT",

View File

@@ -27,7 +27,7 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

File diff suppressed because it is too large Load Diff

View File

@@ -12,9 +12,9 @@
"license": "MIT",
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

View File

@@ -24,7 +24,7 @@
},
"scripts": {
"build": "babel src -d . --ignore **/__tests__ --extensions \".ts,.js\"",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},

File diff suppressed because it is too large Load Diff

View File

@@ -27,9 +27,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -27,9 +27,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -25,9 +25,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -27,9 +27,9 @@
},
"scripts": {
"build": "babel src -d .",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
"test": "jest --passWithNoTests"
},
"peerDependencies": {
"medusa-interfaces": "1.x"

File diff suppressed because it is too large Load Diff

View File

@@ -10,4 +10,5 @@ module.exports = {
".(ts|tsx)$": require.resolve("ts-jest/dist/"),
},
setupFilesAfterEnv: ["./jest.setup.js"],
testEnvironment: "jsdom",
}

View File

@@ -11,11 +11,11 @@
"node": ">=10"
},
"scripts": {
"start": "tsdx watch",
"build": "tsdx build",
"prepare": "tsdx build",
"test": "tsdx test --passWithNoTests",
"lint": "tsdx lint",
"start": "dts watch",
"build": "dts build",
"prepare": "dts build",
"test": "dts test --passWithNoTests",
"lint": "dts lint",
"size": "size-limit",
"analyze": "size-limit --why",
"storybook": "start-storybook -p 6006 -s public",
@@ -68,6 +68,7 @@
"@types/react-dom": "^17.0.10",
"axios": "^0.24.0",
"babel-loader": "^8.2.3",
"dts-cli": "^1.5.1",
"husky": "^7.0.4",
"msw": "^0.35.0",
"msw-storybook-addon": "^1.5.0",
@@ -76,9 +77,8 @@
"react-is": "^17.0.2",
"react-json-view": "^1.21.3",
"size-limit": "^6.0.4",
"tsdx": "^0.14.1",
"tslib": "^2.3.1",
"typescript": "^4.5.2"
"ts-jest": "^27.1.4",
"tslib": "^2.3.1"
},
"dependencies": {
"@medusajs/medusa-js": "^1.2.3",
@@ -86,9 +86,6 @@
"lodash-es": "^4.17.21",
"react-query": "^3.31.0"
},
"resolutions": {
"**/typescript": "^4.1.3"
},
"msw": {
"workerDirectory": "public"
},

File diff suppressed because it is too large Load Diff

View File

@@ -11,9 +11,9 @@
"author": "Kasper Fabrcius Kristensen <kasper@medusa-commerce.com>",
"license": "MIT",
"scripts": {
"build": "babel src -d . --ignore **/__tests__,**/__mocks__",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore **/__tests__,**/__mocks__",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "babel src -d . --ignore **/__tests__",
"watch": "babel -w src --out-dir . --ignore **/__tests__",
"test": "jest"
},
"peerDependencies": {

File diff suppressed because it is too large Load Diff

View File

@@ -26,13 +26,12 @@
},
"scripts": {
"start": "nodemon --watch plugins/ --watch src/ --exec babel-node src/app.js",
"watch": "babel -w src --out-dir dist/ --ignore **/__tests__ --extensions \".ts,.js\"",
"prepare": "cross-env NODE_ENV=production npm run build",
"build": "babel src -d dist --ignore **/__tests__ --extensions \".ts,.js\"",
"prepare": "cross-env NODE_ENV=production yarn run build",
"watch": "babel -w src --out-dir dist/ --extensions \".ts,.js\"",
"build": "babel src -d dist --extensions \".ts,.js\"",
"serve": "node dist/app.js",
"postinstall": "node dist/postinstall.js || true",
"test": "jest",
"test:unit": "jest"
"test": "jest --passWithNoTests"
},
"dependencies": {
"axios": "^0.21.1",

File diff suppressed because it is too large Load Diff

View File

@@ -9,10 +9,10 @@
"directory": "packages/medusa-test-utils"
},
"scripts": {
"test": "jest",
"build": "babel src --out-dir dist/ --ignore **/__tests__",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir dist/ --ignore **/__tests__"
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "babel src --out-dir dist/",
"watch": "babel -w src --out-dir dist/",
"test": "jest --passWithNoTests"
},
"author": "Sebastian Rindom",
"license": "MIT",

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,7 @@
"version": "1.3.3",
"description": "E-commerce for JAMstack",
"main": "dist/index.js",
"bin": {
"medusa": "./cli.js"
},
"bin": "./cli.js",
"repository": {
"type": "git",
"url": "https://github.com/medusajs/medusa",
@@ -39,7 +37,7 @@
"scripts": {
"start": "nodemon --watch plugins/ --watch src/ --exec babel-node src/app.js",
"watch": "tsc --build --watch",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepare": "cross-env NODE_ENV=production yarn run build",
"build": "tsc --build",
"serve": "node dist/app.js",
"test": "jest",

File diff suppressed because it is too large Load Diff

14
turbo.json Normal file
View File

@@ -0,0 +1,14 @@
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/master",
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", "api/**", "services/**", "subscribers/**"]
},
"test": {
"dependsOn": ["build"],
"outputs": []
}
}
}

72636
yarn.lock

File diff suppressed because it is too large Load Diff