Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .eslintrc.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,5 @@ jobs:
clover_file: .coverage/clover.xml
threshold_alert: 50
threshold_warning: 60
# - name: Publish Code Coverage
# run: pnpx codecov
- name: Build the documentation
run: pnpm run docs
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
run: pnpm test
- name: Build the code
run: pnpm build
# - name: Publish Code Coverage
# run: pnpx codecov
- name: Release to npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Coverage][coverage]][codecov-url]

# Gradient Edge commercetools utils

Expand All @@ -15,7 +14,7 @@ See full documentation here: [API documentation](https://gradientedge.github.io/

## How does this compare to the official commercetools SDK?

We think it's easier to use and less verbose. On the flip side, the
We think it's easier to use and less verbose. On the flip side, the
[official commercetools SDK](https://github.com/commercetools/commercetools-sdk-typescript) is
more flexible and certainly more complete and up to date.

Expand Down Expand Up @@ -43,7 +42,7 @@ async function example() {
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
region: Region.EUROPE_GCP,
clientScopes: ['create_anonymous_token']
clientScopes: ['create_anonymous_token'],
})

let grant: CommercetoolsGrant
Expand Down Expand Up @@ -73,15 +72,15 @@ async function example() {
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
region: Region.EUROPE_GCP,
clientScopes: ['create_anonymous_token']
clientScopes: ['create_anonymous_token'],
})

let grant: CommercetoolsGrant

try {
const grant = await auth.login({
username: 'myUsername',
password: 'myPassword'
password: 'myPassword',
})
console.log('Grant:', grant)
} catch (error) {
Expand All @@ -108,7 +107,7 @@ async function example() {
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
region: Region.EUROPE_GCP,
clientScopes: ['create_anonymous_token']
clientScopes: ['create_anonymous_token'],
})

let grant: CommercetoolsGrant
Expand Down Expand Up @@ -140,15 +139,15 @@ async function example() {
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
region: Region.EUROPE_GCP,
clientScopes: ['create_anonymous_token']
clientScopes: ['create_anonymous_token'],
})

let grant: CommercetoolsGrant

try {
const grant = await auth.login({
username: 'myUsername',
password: 'myPassword'
password: 'myPassword',
})
console.log('Grant:', grant)
} catch (error) {
Expand All @@ -169,6 +168,3 @@ async function example() {

example()
```

[codecov-url]: https://app.codecov.io/gh/gradientedge/commercetools-utils
[coverage]: https://codecov.io/gh/gradientedge/commercetools-utils/branch/main/graph/badge.svg
48 changes: 48 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const {
defineConfig,
globalIgnores,
} = require("eslint/config");

const globals = require("globals");
const tsParser = require("@typescript-eslint/parser");
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
const js = require("@eslint/js");

const {
FlatCompat,
} = require("@eslint/eslintrc");

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = defineConfig([{
languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 12,
sourceType: "module",
parserOptions: {},
},

extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"),

plugins: {
"@typescript-eslint": typescriptEslint,
},

rules: {
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"no-empty": "off",
},
}, globalIgnores(["src/lib/types/**/*"])]);
48 changes: 30 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,48 +57,60 @@
},
"homepage": "https://github.com/gradientedge/commercetools-utils#readme",
"devDependencies": {
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@jest/globals": "^29.7.0",
"@sinonjs/fake-timers": "11.3.1",
"@swc/core": "1.13.2",
"@swc/helpers": "0.5.17",
"@swc/core": "1.15.11",
"@swc/helpers": "0.5.18",
"@swc/jest": "0.2.39",
"@types/jest": "29.5.14",
"@types/json-stringify-safe": "5.0.3",
"@types/lodash": "4.17.20",
"@types/lodash": "4.17.23",
"@types/lodash.clonedeep": "4.5.9",
"@types/node": "24.1.0",
"@types/node": "25.3.0",
"@types/qs": "6.14.0",
"@types/sinonjs__fake-timers": "8.1.5",
"@types/traverse": "0.6.37",
"@typescript-eslint/eslint-plugin": "8.38.0",
"@typescript-eslint/parser": "8.38.0",
"codecov": "3.8.3",
"@typescript-eslint/eslint-plugin": "8.56.0",
"@typescript-eslint/parser": "8.56.0",
"commitizen": "4.3.1",
"cz-conventional-changelog": "3.3.0",
"eslint": "8.57.1",
"eslint": "9.39.2",
"eslint-config-prettier": "10.1.8",
"globals": "^17.3.0",
"husky": "9.1.7",
"jest": "29.7.0",
"jest-extended": "^4.0.2",
"jest-matcher-specific-error": "1.0.0",
"jest-mock": "29.7.0",
"nock": "14.0.6",
"prettier": "3.6.2",
"rimraf": "6.0.1",
"semantic-release": "24.2.7",
"ts-jest": "29.4.0",
"nock": "14.0.11",
"prettier": "3.8.1",
"rimraf": "6.1.3",
"semantic-release": "25.0.3",
"ts-jest": "29.4.6",
"ts-node": "^10.9.2",
"typedoc": "0.28.7",
"typescript": "5.8.3"
"typedoc": "0.28.17",
"typescript": "5.9.3"
},
"dependencies": {
"@tshttp/status": "2.0.0",
"axios": "1.12.2",
"axios": "1.13.5",
"http-status-codes": "^2.3.0",
"json-stringify-safe": "5.0.1",
"qs": "6.14.1",
"qs": "6.15.0",
"traverse": "0.6.11",
"uuid": "11.1.0"
},
"pnpm": {
"overrides": {
"lodash-es": "4.17.23",
"lodash": "4.17.23",
"js-yaml": "3.14.2",
"markdown-it": "14.1.1",
"tmp": "0.2.5",
"diff": "5.2.2"
}
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
Expand Down
Loading