Skip to content

Commit a205abe

Browse files
committed
Fixed issues and package versions bumped
1 parent 6e170b9 commit a205abe

32 files changed

Lines changed: 1208 additions & 1073 deletions

File tree

.github/workflows/unit-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,8 @@ jobs:
2929
run: |
3030
NODE_ENV=PREPACK_MODE pnpm -r --sort run build
3131
32+
- name: Run lint
33+
run: NODE_ENV=PREPACK_MODE npm run lint
34+
3235
- name: Run tests
33-
run: NODE_ENV=PREPACK_MODE pnpm test
36+
run: NODE_ENV=PREPACK_MODE npm run test

.talismanrc

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
fileignoreconfig:
2-
- filename: packages/contentstack-bootstrap/src/bootstrap/utils.ts
3-
checksum: 6e6fb00bb11b03141e5ad27eeaa4af9718dc30520c3e73970bc208cc0ba2a7d2
4-
- filename: .github/workflows/release.yml
5-
checksum: 73807361b1a862dc882846ac75fefca49e3c734db032e9aa80158f2a686bea13
62
- filename: pnpm-lock.yaml
7-
checksum: c94a1596f3e28753b0564c2d344eb3ffeb1a5064fbd45e3288975ef6c7113771
8-
- filename: packages/contentstack-auth/src/commands/auth/logout.ts
9-
checksum: 20ff708d5a0ee56eb8786b19df07b49dacaddfa1deafe99c0397716c7865726d
3+
checksum: 06256d662e300370264d1c7ffe1139c1327dce8401d1822e42bebce224f12020
4+
- filename: packages/contentstack-auth/src/interfaces/index.ts
5+
checksum: ed1e7cd748f199bc5a9236ca727344dd34d9fea96534ee120bfd59476341ba69
6+
- filename: packages/contentstack-utilities/test/unit/logger.test.ts
7+
checksum: b9308855db67bd3d537f4a2d51ead71762df827a91b09614ae06e4ae2bb482f8
8+
- filename: packages/contentstack-utilities/src/fs-utility/core.ts
9+
checksum: ca6582e07fc1b5bd0cd508458f85c1a0b6beaa64a9cb72aa762421f61a42fdc4
10+
- filename: packages/contentstack-utilities/src/fs-utility/helper.ts
11+
checksum: 09d426730e87e084d302d0f842cfc51e9174928d8632e03bc993e3281f63e6d7
1012
version: '1.0'

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"devDependencies": {
55
"husky": "^9.1.7",
6-
"pnpm": "^10.28.0"
6+
"pnpm": "^10.32.1"
77
},
88
"engines": {
99
"node": ">=18.0.0"
@@ -12,6 +12,7 @@
1212
"scripts": {
1313
"clean:packages": "pnpm -r --filter './packages/*' run clean",
1414
"build": "pnpm -r --filter './packages/*' run build",
15+
"lint": "pnpm -r --filter './packages/*' run lint",
1516
"test": "pnpm -r --filter './packages/*' run test",
1617
"prepack": "pnpm -r --filter './packages/*' run prepack",
1718
"bootstrap": "pnpm install",

packages/contentstack-auth/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@
2121
"dependencies": {
2222
"@contentstack/cli-command": "~1.8.0-beta.0",
2323
"@contentstack/cli-utilities": "~1.18.0-beta.0",
24-
"@oclif/core": "^4.3.0",
25-
"@oclif/plugin-help": "^6.2.28",
24+
"@oclif/core": "^4.8.4",
25+
"@oclif/plugin-help": "^6.2.37",
2626
"otplib": "^12.0.1"
2727
},
2828
"devDependencies": {
2929
"@fancy-test/nock": "^0.1.1",
3030
"@oclif/plugin-help": "^6.2.28",
31-
"@oclif/test": "^4.1.13",
31+
"@oclif/test": "^4.1.16",
3232
"@types/chai": "^4.3.20",
3333
"@types/mkdirp": "^1.0.2",
3434
"@types/mocha": "^8.2.3",
3535
"@types/node": "^14.18.63",
3636
"@types/sinon": "^21.0.0",
3737
"chai": "^4.5.0",
38-
"dotenv": "^16.4.7",
38+
"dotenv": "^16.6.1",
3939
"eslint": "^8.57.1",
4040
"eslint-config-oclif": "^5.2.2",
4141
"eslint-config-oclif-typescript": "^3.1.14",
4242
"mocha": "10.8.2",
4343
"nyc": "^15.1.0",
44-
"oclif": "^4.17.46",
45-
"sinon": "^21.0.1",
44+
"oclif": "^4.22.87",
45+
"sinon": "^21.0.2",
4646
"ts-node": "^10.9.2",
4747
"typescript": "^4.9.5"
4848
},

packages/contentstack-auth/src/interfaces/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export interface User {
2525
}
2626

2727
export interface Context {
28+
[key: string]: unknown;
2829
command: string;
2930
module: string;
3031
userId: string | undefined;

packages/contentstack-command/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
},
2020
"dependencies": {
2121
"@contentstack/cli-utilities": "~1.18.0-beta.0",
22-
"contentstack": "^3.25.3",
23-
"@oclif/core": "^4.3.0",
24-
"@oclif/plugin-help": "^6.2.28"
22+
"@oclif/core": "^4.8.4",
23+
"@oclif/plugin-help": "^6.2.37",
24+
"contentstack": "^3.26.4"
2525
},
2626
"devDependencies": {
27-
"@oclif/test": "^4.1.13",
27+
"@oclif/test": "^4.1.16",
2828
"@types/mkdirp": "^1.0.2",
2929
"@types/mocha": "^8.2.3",
3030
"@types/node": "^14.18.63",
3131
"eslint": "^8.57.1",
32-
"eslint-config-oclif": "^6.0.15",
33-
"eslint-config-oclif-typescript": "^3.1.13",
32+
"eslint-config-oclif": "^6.0.148",
33+
"eslint-config-oclif-typescript": "^3.1.14",
3434
"mocha": "10.8.2",
3535
"nyc": "^15.1.0",
3636
"ts-node": "^8.10.2",

packages/contentstack-config/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,25 @@
2020
"dependencies": {
2121
"@contentstack/cli-command": "~1.8.0-beta.0",
2222
"@contentstack/cli-utilities": "~1.18.0-beta.0",
23-
"@contentstack/utils": "~1.7.0",
24-
"@oclif/core": "^4.3.0",
25-
"@oclif/plugin-help": "^6.2.28",
23+
"@contentstack/utils": "~1.7.1",
24+
"@oclif/core": "^4.8.4",
25+
"@oclif/plugin-help": "^6.2.37",
2626
"lodash": "^4.17.23"
2727
},
2828
"devDependencies": {
29-
"@oclif/test": "^4.1.13",
29+
"@oclif/test": "^4.1.16",
3030
"@types/chai": "^4.3.20",
3131
"@types/mocha": "^8.2.3",
3232
"@types/node": "^14.18.63",
3333
"@types/sinon": "^21.0.0",
3434
"chai": "^4.5.0",
3535
"eslint": "^8.57.1",
36-
"eslint-config-oclif": "^6.0.62",
36+
"eslint-config-oclif": "^6.0.148",
3737
"eslint-config-oclif-typescript": "^3.1.14",
3838
"mocha": "10.8.2",
3939
"nyc": "^15.1.0",
40-
"oclif": "^4.17.46",
41-
"sinon": "^21.0.1",
40+
"oclif": "^4.22.87",
41+
"sinon": "^21.0.2",
4242
"ts-node": "^10.9.2",
4343
"typescript": "^4.9.5"
4444
},

packages/contentstack-dev-dependencies/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
"author": "contentstack",
2424
"license": "MIT",
2525
"dependencies": {
26-
"@oclif/core": "^4.3.0",
27-
"lodash": "^4.17.23",
26+
"@oclif/core": "^4.8.4",
27+
"@oclif/test": "^4.1.16",
2828
"fancy-test": "^2.0.42",
29-
"@oclif/test": "^4.1.13"
29+
"lodash": "^4.17.23"
3030
},
3131
"devDependencies": {
3232
"@types/node": "^14.18.63",

packages/contentstack-dev-dependencies/src/csdx-test-suite/command.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import split from 'lodash/split';
33
import replace from 'lodash/replace';
44
import { Command,Interfaces, toStandardizedId } from '@oclif/core';
55

6-
import { loadConfig } from './load-config';
6+
import { loadConfig, LoadConfigOptions } from './load-config';
77

88
const castArray = <T>(input?: T | T[]): T[] => {
99
if (input === undefined) return [];
@@ -13,16 +13,16 @@ const castArray = <T>(input?: T | T[]): T[] => {
1313
export function command(
1414
commandInstance: Command.Class,
1515
args: string[] | string,
16-
opts: loadConfig.Options = {},
16+
opts: LoadConfigOptions = {},
1717
): {
1818
run(ctx: { config: Interfaces.Config; expectation: string }): Promise<void>;
1919
} {
2020
return {
2121
async run(ctx: { config: Interfaces.Config; expectation: string }) {
22-
if (!ctx.config || opts.reset) ctx.config = await loadConfig(opts).run({} as any);
22+
if (!ctx.config || opts.reset) ctx.config = await loadConfig(opts).run({});
2323
args = castArray(args);
24-
const firstExample: string = '' + first(commandInstance.examples);
25-
const [id] = split(replace(firstExample, '$ csdx ', ''), ' ');
24+
const exampleText = String(first(commandInstance.examples));
25+
const [id] = split(replace(exampleText, '$ csdx ', ''), ' ');
2626
const cmdId = toStandardizedId(id, ctx.config);
2727
ctx.expectation = ctx.expectation || `runs ${args.join(' ')}`;
2828
await ctx.config.runHook('init', { id: cmdId, argv: args });

packages/contentstack-dev-dependencies/src/csdx-test-suite/exit.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,22 @@ import { expect } from 'chai';
77
* @param {number} code expected code
88
* @default 0
99
*/
10-
export default (code = 0) => ({
10+
function expectExit(code = 0) {
11+
return {
1112
run() {
1213
expect(process.exitCode).to.equal(code);
1314
throw new Error(`Expected to exit with code ${code} but it ran without exiting`);
1415
},
15-
catch(ctx: { error: any }) {
16-
if (!ctx.error.oclif || ctx.error.oclif.exit === undefined) throw ctx.error;
17-
expect(ctx.error.oclif.exit).to.equal(code);
16+
catch(ctx: { error: unknown }) {
17+
const err = ctx.error as {
18+
oclif?: {
19+
exit?: number;
20+
};
21+
};
22+
if (err.oclif?.exit === undefined) throw ctx.error;
23+
expect(err.oclif.exit).to.equal(code);
1824
},
19-
});
25+
};
26+
}
27+
28+
export default expectExit;

0 commit comments

Comments
 (0)