Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use node 21 for github actions #5842

Closed
wants to merge 14 commits into from
25 changes: 12 additions & 13 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js environment
- name: Setup Node.js 21 environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Assert changed
Expand Down Expand Up @@ -45,10 +45,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js environment
- name: Setup Node.js 21 environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Assert changed
Expand Down Expand Up @@ -106,10 +106,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js environment
- name: Setup Node.js 21 environment
uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down Expand Up @@ -167,10 +167,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js environment
- name: Setup Node.js 21 environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand All @@ -187,7 +187,6 @@ jobs:
DB_PASSWORD: postgres
DB_USERNAME: postgres


integration-tests-plugins:
needs: setup
runs-on: ubuntu-latest
Expand Down Expand Up @@ -220,10 +219,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js environment
- name: Setup Node.js 21 environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down Expand Up @@ -273,10 +272,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js environment
- name: Setup Node.js 21 environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codegen-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-freshness-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-new-announcement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-remove-announcement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Documentation Tests
on:
on:
pull_request:
paths:
- www/**
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand All @@ -40,7 +40,7 @@ jobs:
NODE_OPTIONS: "--max-old-space-size=8192"
API_URL: "https://docs.medusajs.com"
run: yarn build:docs

vale-docs:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest
Expand All @@ -65,13 +65,13 @@ jobs:
with:
files: ${{ steps.directories.outputs.LIST }}
fail_on_error: true
vale_flags: '--minAlertLevel=error'
vale_flags: "--minAlertLevel=error"
reporter: github-pr-check
token: ${{ github.token }}
filter_mode: nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}

vale-ui:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest
Expand All @@ -96,13 +96,13 @@ jobs:
with:
files: ${{ steps.directories.outputs.LIST }}
fail_on_error: true
vale_flags: '--minAlertLevel=error'
vale_flags: "--minAlertLevel=error"
reporter: github-pr-check
token: ${{ github.token }}
filter_mode: nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}

vale-api:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest
Expand All @@ -127,13 +127,13 @@ jobs:
with:
files: ${{ steps.directories.outputs.LIST }}
fail_on_error: true
vale_flags: '--minAlertLevel=error'
vale_flags: "--minAlertLevel=error"
reporter: github-pr-check
token: ${{ github.token }}
filter_mode: nofilter
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ github.token }}

content-eslint:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest
Expand All @@ -155,7 +155,7 @@ jobs:
- name: Run Eslint
working-directory: www
run: yarn lint:content

code-docs-eslint:
if: ${{ startsWith(github.head_ref, 'docs/') }}
runs-on: ubuntu-latest
Expand All @@ -179,4 +179,4 @@ jobs:

- name: Run Eslint
working-directory: www
run: yarn lint
run: yarn lint
10 changes: 5 additions & 5 deletions .github/workflows/generate-references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ on:
workflow_dispatch:
inputs:
referenceName:
description: 'Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or a name of a config file in `docs-util/packages/typedoc-config` such as `product`'
description: "Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or a name of a config file in `docs-util/packages/typedoc-config` such as `product`"
required: false
default: 'all'
default: "all"
release:
types: [published]

Expand All @@ -26,7 +26,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand All @@ -116,4 +116,4 @@ jobs:
labels: "type: chore"
add-paths: www/apps/api-reference/specs
branch: "docs/generate-api-ref"
branch-suffix: "timestamp"
branch-suffix: "timestamp"
2 changes: 1 addition & 1 deletion .github/workflows/oas-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-notifications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16.10.0"
node-version: "21.1.0"
cache: "yarn"

- name: Post to Slack channel
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 16
- name: Setup Node.js 21
uses: actions/setup-node@v3
with:
node-version: 16
node-version: "21.1.0"

- name: Creating .npmrc
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot-this.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: "21.1.0"
cache: "yarn"

- name: Install dependencies
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/staging-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- "docs/**"
- "www/**"
- ".github/**"


concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand All @@ -21,10 +20,10 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 16.x
- name: Setup Node.js 21
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: "21.1.0"

- name: Creating .npmrc
run: |
Expand All @@ -33,8 +32,8 @@ jobs:
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Configure npm node prepend

- name: Configure npm node prepend
run: npm config set scripts-prepend-node-path auto

- name: Install Dependencies
Expand All @@ -50,6 +49,6 @@ jobs:

- name: Install Dependencies
run: yarn install --no-immutable

- name: Publish packages under next tag
run: yarn release:next
2 changes: 1 addition & 1 deletion integration-tests/api/__tests__/store/cart/cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ describe("/store/carts", () => {

const cart = getRes.data.cart
expect(cart.context).toEqual({
ip: "::ffff:127.0.0.1",
ip: expect.any(String),
user_agent: expect.stringContaining("axios/0.21."),
test_id: "test",
})
Expand Down
3 changes: 3 additions & 0 deletions packages/medusa-interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
],
"author": "Sebastian Rindom",
"license": "MIT",
"dependencies": {
"@medusajs/utils": "^1.10.0"
},
"devDependencies": {
"@babel/cli": "^7.7.5",
"@babel/core": "^7.7.5",
Expand Down
6 changes: 1 addition & 5 deletions packages/medusa-interfaces/src/base-service.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
// Import from dist to avoid circular deps which result in the base service to be undefined
import {
buildQuery,
setMetadata,
validateId,
} from "@medusajs/medusa/dist/utils"
import { buildQuery, setMetadata, validateId } from "@medusajs/utils"

/**
* Common functionality for Services
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35757,6 +35757,7 @@ __metadata:
"@babel/preset-env": ^7.7.5
"@babel/preset-typescript": ^7.13.0
"@babel/runtime": ^7.9.6
"@medusajs/utils": ^1.10.0
cross-env: ^5.2.1
jest: ^25.5.4
medusa-core-utils: ^1.2.0
Expand Down