Skip to content

Commit

Permalink
Require Node.js 18 and Ink 5 (#72)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Loading branch information
jlarmstrongiv and sindresorhus authored Jun 6, 2024
1 parent 0ff9c2f commit c357d3d
Show file tree
Hide file tree
Showing 82 changed files with 88 additions and 87 deletions.
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"default": "./build/index.js"
},
"engines": {
"node": ">=16"
"node": ">=18"
},
"scripts": {
"build": "tsc",
"dev": "tsc --watch",
"test": "tsc --noEmit && xo && ava",
"test": "tsc --noEmit && xo && NODE_OPTIONS='--loader=ts-node/esm --experimental-specifier-resolution=node --no-warnings' ava",
"prepare": "tsc"
},
"files": [
Expand Down Expand Up @@ -60,7 +60,7 @@
"zod": "^3.21.4"
},
"peerDependencies": {
"ink": "^4.2.0",
"ink": ">=5.0.0",
"react": "^18.2.0",
"zod": "^3.21.4"
},
Expand All @@ -70,9 +70,6 @@
"ts": "module",
"tsx": "module"
},
"nodeArguments": [
"--loader=ts-node/esm"
],
"environmentVariables": {
"NODE_NO_WARNINGS": "1"
}
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/all-optional-options/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const options = zod
.partial();

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/array-option/alias/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/array-option/description/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/array-option/optional/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/array-option/required/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/boolean-option/alias/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/boolean-option/default/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/boolean-option/negated/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/camelcase-argument/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import zod from 'zod';
export const args = zod.tuple([zod.string().describe('firstName')]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/camelcase-option/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const args = zod
);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe('os');

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe(argument({name: 'os', description: 'Operating systems'}));

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-argument/array-name/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe(argument({name: 'os'}));

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-argument/array/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import zod from 'zod';
export const args = zod.array(zod.enum(['Ubuntu', 'Debian'])).describe('os');

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const args = zod.tuple([
]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const args = zod.tuple([
]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-argument/description/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const args = zod.tuple([
]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe('os');

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-argument/optional/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const os = zod.enum(['Ubuntu', 'Debian']).optional();
export const args = zod.tuple([os.describe('first'), os.describe('second')]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-argument/required/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const args = zod.tuple([
]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-argument/variadic/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const args = zod
.rest(os.describe('rest'));

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-option/alias/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-option/default-value/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-option/description/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-option/optional/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/enum-option/required/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const options = zod.object({
});

type Props = {
options: zod.infer<typeof options>;
readonly options: zod.infer<typeof options>;
};

export default function Index({options}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const args = zod
);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe('number');

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe(argument({name: 'number', description: 'Numbers'}));

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const args = zod
.describe(argument({name: 'number'}));

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/number-argument/array/commands/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import zod from 'zod';
export const args = zod.array(zod.number()).describe('number');

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const args = zod.tuple([
]);

type Props = {
args: zod.infer<typeof args>;
readonly args: zod.infer<typeof args>;
};

export default function Index({args}: Props) {
Expand Down
Loading

0 comments on commit c357d3d

Please sign in to comment.