Skip to content

Commit f103b0b

Browse files
author
Palumbo
committed
docs(contributing): updated link about renovate
1 parent d43069d commit f103b0b

File tree

96 files changed

+15910
-148062
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+15910
-148062
lines changed

.changeset/silver-tips-serve.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
'@commercetools/sdk-middleware-correlation-id': major
3+
'@commercetools/sdk-middleware-user-agent': major
4+
'@commercetools/csv-parser-discount-code': major
5+
'@commercetools/customer-groups-exporter': major
6+
'@commercetools/custom-objects-exporter': major
7+
'@commercetools/custom-objects-importer': major
8+
'@commercetools/discount-code-generator': major
9+
'@commercetools/discount-code-exporter': major
10+
'@commercetools/discount-code-importer': major
11+
'@commercetools/personal-data-erasure': major
12+
'@commercetools/sdk-middleware-logger': major
13+
'@commercetools/inventories-exporter': major
14+
'@commercetools/product-json-to-xlsx': major
15+
'@commercetools/sdk-middleware-queue': major
16+
'@commercetools/api-request-builder': major
17+
'@commercetools/product-json-to-csv': major
18+
'@commercetools/sdk-middleware-auth': major
19+
'@commercetools/sdk-middleware-http': major
20+
'@commercetools/category-exporter': major
21+
'@commercetools/csv-parser-orders': major
22+
'@commercetools/csv-parser-price': major
23+
'@commercetools/csv-parser-state': major
24+
'@commercetools/product-exporter': major
25+
'@commercetools/resource-deleter': major
26+
'@commercetools/get-credentials': major
27+
'@commercetools/http-user-agent': major
28+
'@commercetools/price-exporter': major
29+
'@commercetools/state-importer': major
30+
'@commercetools/sync-actions': major
31+
'@commercetools/sdk-client': major
32+
'@commercetools/sdk-types': major
33+
'@commercetools/sdk-auth': major
34+
---
35+
36+
# Requires Node.js v18 or later
37+
38+
This releases migrates packages to require Node.js v18 or later. Ideally you should be already using Node.js v20 or later. According to [Node.js Releases](https://nodejs.org/en/about/previous-releases) Node.js v18 will be in maintenance and reach End of Life by the end of April.
39+
40+
Other than requiring Node.js v18 packages with this releases do not contain any internal breaking changes.

.circleci/config.yml

Lines changed: 64 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,6 @@ version: 2.1
33
aliases:
44
- &working_directory ~/nodejs
55

6-
- &restore_yarn_cache_node_18
7-
keys:
8-
- v1-yarn-cache-node_18-{{ .Branch }}-{{ checksum "yarn.lock" }}
9-
- v1-yarn-cache-node_18-{{ .Branch }}
10-
- v1-yarn-cache-node_18
11-
12-
- &save_yarn_cache_node_18
13-
key: v1-yarn-cache-node_18-{{ .Branch }}-{{ checksum "yarn.lock" }}
14-
paths:
15-
- ~/.cache/yarn
16-
17-
18-
- &restore_yarn_cache_node_20
19-
keys:
20-
- v1-yarn-cache-node_20-{{ .Branch }}-{{ checksum "yarn.lock" }}
21-
- v1-yarn-cache-node_20-{{ .Branch }}
22-
- v1-yarn-cache-node_20
23-
24-
- &save_yarn_cache_node_20
25-
key: v1-yarn-cache-node_20-{{ .Branch }}-{{ checksum "yarn.lock" }}
26-
paths:
27-
- ~/.cache/yarn
28-
29-
- &restore_yarn_cache_node_22
30-
keys:
31-
- v1-yarn-cache-node_22-{{ .Branch }}-{{ checksum "yarn.lock" }}
32-
- v1-yarn-cache-node_22-{{ .Branch }}
33-
- v1-yarn-cache-node_22
34-
35-
- &save_yarn_cache_node_22
36-
key: v1-yarn-cache-node_22-{{ .Branch }}-{{ checksum "yarn.lock" }}
37-
paths:
38-
- ~/.cache/yarn
39-
40-
- &yarn_install
41-
name: Installing
42-
command: yarn --frozen-lockfile
43-
446
executors:
457
node_18:
468
docker:
@@ -56,72 +18,117 @@ executors:
5618
- image: cimg/node:22.14.0
5719
working_directory: *working_directory
5820

21+
commands:
22+
pnpm_install:
23+
description: Installs dependencies using PNPM
24+
parameters:
25+
pnpm_store_dir:
26+
type: string
27+
default: /home/circleci/.local/share/pnpm/store
28+
pnpm_install_directory:
29+
type: string
30+
default: /home/circleci/bin
31+
command:
32+
type: string
33+
default: pnpm install --frozen-lockfile
34+
steps:
35+
- restore_cache:
36+
name: Restoring pnpm cache
37+
keys:
38+
# Delete and re-create a increased `CACHE_VERSION_PNPM` variable in CircleCI's project configuration.
39+
# https://app.circleci.com/settings/project/github/commercetools/nodejs/environment-variables
40+
- pnpm-cache-{{ .Environment.CACHE_VERSION_PNPM }}-{{ checksum "pnpm-lock.yaml" }}
41+
- run:
42+
name: Ensuring pnpm installation directory exists
43+
command: mkdir -p << parameters.pnpm_install_directory >>
44+
- run:
45+
name: Exporting << parameters.pnpm_install_directory >> to PATH
46+
command: echo 'export PATH=$PATH:<< parameters.pnpm_install_directory >>' >> $BASH_ENV
47+
- run:
48+
name: Installing pnpm via corepack
49+
command: |
50+
corepack enable --install-directory << parameters.pnpm_install_directory >>
51+
corepack prepare --activate
52+
- run:
53+
name: Setting pnpm store
54+
command: pnpm config set store-dir << parameters.pnpm_store_dir >>
55+
- save_cache:
56+
name: Saving pnpm cache
57+
key: pnpm-cache-{{ .Environment.CACHE_VERSION_PNPM }}-{{ checksum "pnpm-lock.yaml" }}
58+
paths:
59+
- node_modules
60+
- run:
61+
name: Installing project dependencies
62+
command: << parameters.command >>
63+
5964
jobs:
6065
install_test_node_18:
6166
executor: node_18
6267
steps:
6368
- checkout
64-
- restore_cache: *restore_yarn_cache_node_18
65-
- run: *yarn_install
66-
- save_cache: *save_yarn_cache_node_18
69+
- pnpm_install
70+
- run:
71+
name: Building libraries
72+
command: pnpm build
6773
- run:
6874
name: Running linters
6975
# Limiting the workers of Jest to 10
7076
# as the build otherwise dies due to resource restrictions.
71-
command: yarn lint --maxWorkers=10
77+
command: pnpm lint --maxWorkers=10
7278
- run:
7379
name: Running tests
7480
# Limiting the workers of Jest to 10
7581
# as the build otherwise dies due to resource restrictions.
76-
command: yarn test:ci
82+
command: pnpm test:ci
7783
- run:
7884
name: Running test (with coverage report)
79-
command: yarn test:ci
85+
command: pnpm test:ci
8086

8187
install_test_node_20:
8288
executor: node_20
8389
steps:
8490
- checkout
85-
- restore_cache: *restore_yarn_cache_node_20
86-
- run: *yarn_install
87-
- save_cache: *save_yarn_cache_node_20
91+
- pnpm_install
92+
- run:
93+
name: Building libraries
94+
command: pnpm build
8895
- run:
8996
name: Running linters
9097
# Limiting the workers of Jest to 10
9198
# as the build otherwise dies due to resource restrictions.
92-
command: yarn lint --maxWorkers=10
99+
command: pnpm lint --maxWorkers=10
93100
- run:
94101
name: Running tests (with coverage report)
95102
# Limiting the workers of Jest to 10
96103
# as the build otherwise dies due to resource restrictions.
97-
command: yarn test:coverage:ci
104+
command: pnpm test:coverage:ci
98105
- run:
99106
name: Running integration tests
100-
command: yarn test:integration
107+
command: pnpm test:integration
101108

102109
install_test_node_22:
103110
executor: node_22
104111
steps:
105112
- checkout
106-
- restore_cache: *restore_yarn_cache_node_22
107-
- run: *yarn_install
108-
- save_cache: *save_yarn_cache_node_22
113+
- pnpm_install
114+
- run:
115+
name: Building libraries
116+
command: pnpm build
109117
- run:
110118
name: Running linters
111119
# Limiting the workers of Jest to 10
112120
# as the build otherwise dies due to resource restrictions.
113-
command: yarn lint --maxWorkers=10
121+
command: pnpm lint --maxWorkers=10
114122
- run:
115123
name: Running tests (with coverage report)
116124
# Limiting the workers of Jest to 10
117125
# as the build otherwise dies due to resource restrictions.
118-
command: yarn test:coverage:ci
126+
command: pnpm test:coverage:ci
119127
- run:
120128
name: Running integration tests
121-
command: yarn test:integration
129+
command: pnpm test:integration
122130

123131
workflows:
124-
version: 2
125132
build_and_test:
126133
jobs:
127134
- install_test_node_18:

.github/workflows/release.yml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,19 @@ jobs:
2626
# https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8
2727
token: ${{ steps.generate_github_token.outputs.token }}
2828

29-
- name: Read .nvmrc
30-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
31-
id: nvm
32-
33-
- name: Setup Node (uses version in .nvmrc)
34-
uses: actions/setup-node@v2
29+
- name: Install pnpm
30+
uses: pnpm/[email protected]
3531
with:
36-
node-version: '${{ steps.nvm.outputs.NVMRC }}'
32+
run_install: false
3733

38-
- name: Get yarn cache
39-
id: yarn-cache
40-
run: echo "::set-output name=dir::$(yarn cache dir)"
41-
42-
- uses: actions/cache@v4
34+
- name: Setup Node (uses version in .nvmrc)
35+
uses: actions/setup-node@v4
4336
with:
44-
path: ${{ steps.yarn-cache.outputs.dir }}
45-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
46-
restore-keys: |
47-
${{ runner.os }}-yarn-
37+
node-version-file: '.nvmrc'
38+
cache: 'pnpm'
4839

4940
- name: Install dependencies
50-
run: yarn install --frozen-lockfile
41+
run: pnpm install --frozen-lockfile
5142

5243
- name: Creating .npmrc
5344
run: |
@@ -59,14 +50,14 @@ jobs:
5950
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
6051

6152
- name: Building packages
62-
run: yarn build
53+
run: pnpm build
6354

6455
- name: Create Release Pull Request or Publish to npm
6556
id: changesets
6657
uses: changesets/action@master
6758
with:
68-
publish: yarn changeset publish
69-
version: yarn changeset:version-and-format
59+
publish: pnpm changeset publish
60+
version: pnpm changeset:version-and-format
7061
commit: 'ci(changesets): version packages'
7162
env:
7263
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm commitlint --edit $1

.husky/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pnpm typecheck:ts
2+
3+
pnpm lint-staged

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18
1+
22

0 commit comments

Comments
 (0)