Skip to content

Commit 2b1f20a

Browse files
authored
Merge pull request #2518 from contentstack/fix/back-merge
Back Merge main to v2-beta
2 parents 0684ade + 8534863 commit 2b1f20a

File tree

89 files changed

+1935
-2857
lines changed

Some content is hidden

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

89 files changed

+1935
-2857
lines changed

.github/workflows/lint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
13+
with:
14+
version: 10.28.0
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
cache: 'pnpm'
19+
- run: pnpm install --no-frozen-lockfile
20+
- run: pnpm -r --sort --workspace-concurrency=1 run build
21+
- run: pnpm run lint

.github/workflows/policy-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
if [ "$license_file_found" = false ]; then
4444
echo "No license file found. Please add a license file to the repository."
4545
exit 1
46-
fi
46+
fi

.github/workflows/sca-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
args: --fail-on=all --all-projects
1616
json: true
1717
continue-on-error: true
18-
- uses: contentstack/sca-policy@main
18+
- uses: contentstack/sca-policy@main

.github/workflows/unit-test.yml

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,36 @@
1-
name: Run Unit Tests
1+
name: Unit Tests
22

33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8-
run-tests:
8+
test:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v4
13-
14-
- name: Setup pnpm
15-
uses: pnpm/action-setup@v4
11+
- uses: actions/checkout@v4
12+
- uses: pnpm/action-setup@v4
1613
with:
17-
version: 10.28.0 # or your local pnpm version
18-
19-
- name: Set up Node.js
20-
uses: actions/setup-node@v4
14+
version: 10.28.0
15+
- uses: actions/setup-node@v4
2116
with:
2217
node-version: '22.x'
23-
cache: 'pnpm' # optional but recommended
24-
25-
# - name: Temporarily disable contentstack package
26-
# run: mv packages/contentstack/package.json packages/contentstack/package.json.disabled || true
27-
28-
- name: Install Dependencies (Excluding Contentstack)
29-
run: pnpm install --no-frozen-lockfile
30-
31-
- name: Build all plugins (Excluding Contentstack)
32-
run: |
33-
NODE_ENV=PREPACK_MODE pnpm -r --sort run build
34-
35-
# - name: Restore contentstack package
36-
# run: mv packages/contentstack/package.json.disabled packages/contentstack/package.json || true
37-
38-
- name: Run tests for Contentstack Command
18+
cache: 'pnpm'
19+
- run: pnpm install --no-frozen-lockfile
20+
- run: pnpm -r --sort --workspace-concurrency=1 run build
21+
- name: Test contentstack
22+
working-directory: ./packages/contentstack
23+
run: pnpm test
24+
- name: Test contentstack-command
3925
working-directory: ./packages/contentstack-command
40-
run: npm run test:unit
41-
42-
- name: Run tests for Contentstack Config
26+
run: pnpm test
27+
- name: Test contentstack-config
4328
working-directory: ./packages/contentstack-config
44-
run: npm run test:unit
45-
46-
- name: Run tests for Contentstack Auth
29+
run: pnpm test
30+
- name: Test contentstack-auth
4731
working-directory: ./packages/contentstack-auth
48-
run: NODE_ENV=PREPACK_MODE npm run test:unit
32+
run: pnpm test
33+
# Commented out in v2-beta production
34+
# - name: Test contentstack-utilities
35+
# working-directory: ./packages/contentstack-utilities
36+
# run: pnpm test

.talismanrc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
fileignoreconfig:
2+
- filename: .github/workflows/release-production-pipeline.yml
3+
checksum: 4aef94feea3ea0538162a9454cfd30457ec85e3123672f0933713e3d113d4504
4+
- filename: packages/contentstack-utilities/src/proxy-helper.ts
5+
checksum: 2169f25563bca3a0fe54edd00c73646ed56d36aa7e8effe904de26b0c1633759
6+
- filename: packages/contentstack-config/test/unit/commands/proxy.test.ts
7+
checksum: b92210826693683300728e7e82e6789f0ad697b17e6b99a8a004c9a041bced00
8+
- filename: packages/contentstack/test/unit/context-handler.test.ts
9+
checksum: 6ef78899d3089685271bd16c156d057c807fd9b8560189387ae44e9576d23095
10+
- filename: packages/contentstack/README.md
11+
checksum: cdd03f1f11ef3ecf04f71ed0a468501633ce92f0d487ee097312644578cb3cdc
212
- filename: pnpm-lock.yaml
3-
checksum: 840d10a9ef1d60aeb0edd46a5cf8ae8306c9eee321aff72a9bb0e1a7e5031159
13+
checksum: 503b7df2c37c07135396c6013941e3a155c351e0cd14fe62ac65cedf6ff43bbd
414
version: '1.0'

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"clean:packages": "pnpm -r --filter './packages/*' run clean",
1414
"build": "pnpm -r --filter './packages/*' run build",
1515
"test": "pnpm -r --filter './packages/*' run test",
16+
"lint": "pnpm -r --filter './packages/*' run lint",
1617
"prepack": "pnpm -r --filter './packages/*' run prepack",
1718
"bootstrap": "pnpm install",
1819
"clean:modules": "rm -rf node_modules packages/**/node_modules",

packages/contentstack-auth/.mocharc.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"source-map-support/register",
66
"test/helpers/mocha-root-hooks.js"
77
],
8-
"watch-extensions": [
9-
"ts"
10-
],
8+
"watch-extensions": ["ts"],
119
"recursive": true,
12-
"timeout": 5000
13-
}
10+
"reporter": "spec",
11+
"timeout": 10000,
12+
"exit": true
13+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"inlcude": [
2+
"include": [
33
"lib/**/*.js"
44
]
55
}

packages/contentstack-auth/package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,21 @@
1111
"postpack": "rm -f oclif.manifest.json",
1212
"prepack": "pnpm compile && oclif manifest && oclif readme",
1313
"version": "oclif readme && git add README.md",
14-
"test:report": "tsc -p test && nyc --reporter=lcov --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
15-
"pretest": "tsc -p test",
16-
"test": "nyc --extension .ts mocha --forbid-only \"test/**/*.test.ts\"",
17-
"posttest": "npm run lint",
18-
"lint": "eslint src/**/*.ts",
19-
"format": "eslint src/**/*.ts --fix",
20-
"test:integration": "mocha --forbid-only \"test/integration/*.test.ts\"",
21-
"test:unit": "mocha --forbid-only \"test/unit/**/*.test.ts\"",
22-
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\""
14+
"test": "mocha \"test/unit/**/*.test.ts\"",
15+
"lint": "eslint src/**/*.ts"
2316
},
2417
"dependencies": {
2518
"@contentstack/cli-command": "~2.0.0-beta.5",
2619
"@contentstack/cli-utilities": "~2.0.0-beta.5",
27-
"@oclif/core": "^4.3.0",
20+
"@oclif/core": "^4.8.3",
2821
"@oclif/plugin-help": "^6.2.28",
2922
"otplib": "^12.0.1"
3023
},
24+
"overrides": {
25+
"@oclif/core": {
26+
"picomatch": "^4.0.4"
27+
}
28+
},
3129
"devDependencies": {
3230
"@fancy-test/nock": "^0.1.1",
3331
"@oclif/plugin-help": "^6.2.28",
@@ -81,4 +79,4 @@
8179
}
8280
},
8381
"repository": "contentstack/cli"
84-
}
82+
}

packages/contentstack-auth/src/base-command.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import {
33
configHandler,
44
createLogContext,
55
Flags,
6-
getAuthenticationMethod,
76
Interfaces,
8-
log,
97
} from '@contentstack/cli-utilities';
108
import { Context } from './interfaces';
119

0 commit comments

Comments
 (0)