Skip to content

Commit ee2e106

Browse files
Redditbaraben-harris-5
Redditbara
authored andcommitted
Project import generated by Copybara.
GitOrigin-RevId: 5d211595bc6cc61d651330318ed62bf93629fe74
1 parent 7946092 commit ee2e106

File tree

11 files changed

+22
-21
lines changed

11 files changed

+22
-21
lines changed

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
18.18.2
1+
22.5.1
22
lts/*

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To make a new package quickly, you can copy the `template-package` directory and
6060

6161
### Dependencies
6262

63-
- Node v18 - specifically, v18.18.2 or later, but not v20 (yet!). We recommend you [install it using NVM.](https://github.com/nvm-sh/nvm)
63+
- Node v22 - specifically, v22.2.0 or later. We recommend you [install it using NVM.](https://github.com/nvm-sh/nvm)
6464
- yarn, should be pre-installed on node18 with corepack enabled:
6565
```sh
6666
corepack enable

devvit-docs/docs/dev_guide.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you just want to dive into the code, check out the [quickstart](quickstart.md
1313

1414
Make sure you have the following software installed:
1515

16-
- Node.js v18.18.2 or higher
16+
- Node.js v22.2.0 or higher
1717
- Git v2.28.0 or higher
1818

1919
You'll also need an editor for viewing and editing code (we recommend [VS Code](https://code.visualstudio.com/)).

devvit-docs/docs/get-started/environment.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Set up and maintain your developer environment.
99

1010
Make sure you have the following software installed:
1111

12-
- Node.js v18.18.2 or higher
12+
- Node.js v22.2.0 or higher
1313
- Git v2.28.0 or higher
1414

1515
You'll also need an editor for viewing and editing code (we recommend [VS Code](https://code.visualstudio.com/)).

devvit-docs/docs/quickstart.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This quickstart is _really_ quick. For step-by-step instructions, see the [**bui
1010
Here's the tl;dr for building on the Developer Platform. Apps are written in [TypeScript](https://www.typescriptlang.org/). Before
1111
you get started, you'll need:
1212

13-
- [Node.js](https://nodejs.org/) (v18.18.2 - v20.15.1)
13+
- [Node.js](https://nodejs.org/) (v22.2.0+)
1414
- a [test subreddit](https://mods.reddithelp.com/hc/en-us/articles/360001766991-How-to-create-a-subreddit) that you moderate with
1515
less than 200 members
1616
- a code editor (we recommend [VS Code](https://code.visualstudio.com/))

package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,18 @@
6363
"packages/internal-examples/internal-projects/**/*"
6464
],
6565
"resolutions": {
66+
"@xmldom/xmldom": "^0.8.4",
6667
"chalk": "4.1.2",
67-
"wait-on/rxjs": "7.8.1",
68-
"yosay/ansi-regex": "3.0.1",
68+
"http-cache-semantics": "^4.1.1",
69+
"long": "4.0.0",
70+
"nan": "2.20.0",
71+
"recursive-readdir/minimatch": "3.1.2",
6972
"remark-parse/trim": "0.0.3",
7073
"serve-handler/minimatch": "3.1.2",
71-
"recursive-readdir/minimatch": "3.1.2",
7274
"[email protected]/ansi-regex": "3.0.1",
73-
"http-cache-semantics": "^4.1.1",
74-
"@xmldom/xmldom": "^0.8.4",
7575
"vite": "5.2.12",
76-
"long": "4.0.0"
76+
"wait-on/rxjs": "7.8.1",
77+
"yosay/ansi-regex": "3.0.1"
7778
},
7879
"dependencies": {
7980
"typescript": "5.3.2"
@@ -88,14 +89,14 @@
8889
"lerna": "6.6.1",
8990
"lint-staged": "13.0.3",
9091
"lockfile-lint": "4.10.1",
91-
"prettier": "2.8.8",
92+
"prettier": "3.3.3",
9293
"prettier-package-json": "2.8.0",
9394
"turbo": "1.6.3",
9495
"typedoc": "0.25.6",
9596
"vitest": "1.6.0"
9697
},
9798
"engines": {
98-
"node": ">=18.18.2"
99+
"node": ">=22.2.0"
99100
},
100101
"packageManager": "[email protected]"
101102
}

packages/apps/calculator/src/components/Output.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const Output: Devvit.BlockComponent<OutputProps> = ({ calc }) => {
4242
<CurrentOp op={op} active={op === calc?.op} />
4343
));
4444

45-
const bufferText = calc?.op !== undefined ? calc?.operandA ?? '' : '';
45+
const bufferText = calc?.op !== undefined ? (calc?.operandA ?? '') : '';
4646

4747
return (
4848
<vstack

packages/cli/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"@types/inquirer": "9.0.3",
8686
"@types/js-yaml": "4.0.5",
8787
"@types/mustache": "4.2.2",
88-
"@types/node": "18.18.2",
88+
"@types/node": "20.14.12",
8989
"@types/open": "6.2.1",
9090
"@types/ps-node": "0.1.1",
9191
"@types/tsv": "0.2.1",
@@ -99,7 +99,7 @@
9999
"vitest": "1.6.0"
100100
},
101101
"engines": {
102-
"node": ">=18.18.2"
102+
"node": ">=22.2.0"
103103
},
104104
"oclif": {
105105
"bin": "devvit",

packages/public-api/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"build": "yarn build:icon-types && yarn build:semantic-colors && tsc && cp -af devvit.tsconfig.json dist/ && yarn build:types && yarn build:min && yarn build:unmin",
2121
"build:icon-types": "make-icons src/types/icons.ts",
22-
"build:min": "esbuild --bundle --sourcemap=linked --target=es2020 --format=esm --metafile=dist/meta.min.json --outfile=dist/public-api.min.js --external:@devvit/protos --minify src/index.ts",
22+
"build:min": "esbuild --bundle --sourcemap=linked --target=es2020 --format=esm --metafile=dist/meta.min.json --outfile=dist/public-api.min.js --external:@devvit/protos --minify src/index.ts",
2323
"build:semantic-colors": "node scripts/make-semantic-colors.js",
2424
"build:types": "api-extractor run && sed -ne '/declare global {/,$ p' src/devvit/Devvit.ts >> dist/public-api.d.ts",
2525
"build:unmin": "esbuild --bundle --sourcemap=inline --target=es2020 --format=iife --metafile=dist/meta.json --outfile=dist/public-api.iife.js --global-name=devvitPublicAPI src/index.ts",
@@ -57,7 +57,7 @@
5757
"@types/lodash.isequal": "4.5.6",
5858
"@vitest/coverage-c8": "0.32.0",
5959
"chokidar-cli": "3.0.0",
60-
"esbuild": "0.18.12",
60+
"esbuild": "0.23.0",
6161
"eslint": "8.9.0",
6262
"typescript": "5.3.2",
6363
"vitest": "1.6.0"

packages/public-api/src/apis/redis/RedisClient.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ export class RedisClient implements RedisClientLike {
411411

412412
async get(key: string): Promise<string | undefined> {
413413
const response = await this.storage.Get({ key, scope: this.scope }, this.#metadata);
414-
return response !== null ? response.value ?? undefined : response;
414+
return response !== null ? (response.value ?? undefined) : response;
415415
}
416416

417417
async set(key: string, value: string, options?: SetOptions): Promise<string> {
@@ -612,7 +612,7 @@ export class RedisClient implements RedisClientLike {
612612

613613
async hGet(key: string, field: string): Promise<string | undefined> {
614614
const response = await this.storage.HGet({ key, field, scope: this.scope }, this.#metadata);
615-
return response !== null ? response.value ?? undefined : response;
615+
return response !== null ? (response.value ?? undefined) : response;
616616
}
617617

618618
async hset(key: string, fieldValues: { [field: string]: string }): Promise<number> {

packages/public-api/src/devvit/internals/context.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { AppDebug } from '@devvit/shared-types/Header.js';
33
import { Header } from '@devvit/shared-types/Header.js';
44
import { assertNonNull } from '@devvit/shared-types/NonNull.js';
55
import type { BaseContext, ContextDebugInfo } from '../../types/context.js';
6-
import pkg from '../../version.json' assert { type: 'json' };
6+
import pkg from '../../version.json' with { type: 'json' };
77

88
export function getContextFromMetadata(
99
metadata: Metadata,

0 commit comments

Comments
 (0)