Skip to content

Commit 673899a

Browse files
authored
Merge pull request #193 from couchbase-examples/deps/update-2026-04-30
Update dependencies and fix quickstart drift
2 parents 739bfe9 + a123b36 commit 673899a

13 files changed

Lines changed: 8886 additions & 9825 deletions

.env.default

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
CB_USERNAME=Administrator
22
CB_PASSWORD=password
3-
CB_CONNECT_STRING=localhost
3+
CB_CONNECT_STRING=couchbase://localhost
44
CB_BUCKET=user_profile

.github/workflows/cb-service-container.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
node-version: [16.x]
17+
node-version: [24.x]
1818
steps:
1919
- name: Update repositories
2020
run: |
2121
apt update || echo "apt-update failed" # && apt -y upgrade
2222
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v4
2424
with:
2525
node-version: ${{ matrix.node-version }}
2626
- name: Setup couchbase

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To deploy this project on Vercel, you will need:
4848
To run this project locally, you will need:
4949

5050
- A Couchbase Capella database or Couchbase 7+ database running locally
51-
- Node.js & NPM
51+
- Node.js 24 LTS and npm
5252
- Next.js
5353
- Code Editor
5454

@@ -75,7 +75,7 @@ We've included a `.env.local.example` file with blank values for you to copy int
7575
- `CB_USERNAME` - The username of an authorized user on your database. Follow [these instructions](https://docs.couchbase.com/cloud/clusters/manage-database-users.html#create-database-credentials) to create database credentials on Capella.
7676
- `CB_PASSWORD` - The password that corresponds to the user specified above.
7777
- `CB_CONNECT_STRING` - The Couchbase connection string. Use the connection string specified on the 'Connect' tab within Capella (formatted like `couchbases://cb.<xxxxxx>.cloud.couchbase.com`) or `couchbase://localhost` for a local/Docker database.
78-
- `CB_BUCKET` - The bucket you'd like to connect to. Set this to `user_profiles` for this template.
78+
- `CB_BUCKET` - The bucket you'd like to connect to. Set this to `user_profile` for this template.
7979

8080
### Set up and Run The Application
8181

@@ -107,7 +107,7 @@ Now we're ready to run our application:
107107
npm run dev
108108
```
109109

110-
If everything is configured properly, you should be able to navigate to localhost:3000 to see the example application. For troubleshooting and additional setup instructions please refer to the `NextJS_README.md` included in the with-couchbase starter.
110+
If everything is configured properly, you should be able to navigate to localhost:3000 to see the example application. For troubleshooting and additional setup instructions, refer to the notes in this README and the upstream `with-couchbase` starter documentation.
111111

112112
## Sample Data
113113

eslint.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "eslint/config";
2+
import nextVitals from "eslint-config-next/core-web-vitals";
3+
4+
export default defineConfig([
5+
...nextVitals,
6+
{
7+
rules: {
8+
"no-unused-vars": ["error", { vars: "all", args: "after-used", ignoreRestSiblings: false }],
9+
semi: ["error", "always", { omitLastInOneLineBlock: true }]
10+
}
11+
}
12+
]);

jest.config.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import nextJest from 'next/jest.js'
1+
import nextJest from 'next/jest.js';
22

33
const createJestConfig = nextJest({
44
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
55
dir: './',
6-
})
6+
});
77

88
// Add any custom config to be passed to Jest
99
/** @type {import('jest').Config} */
1010
const config = {
1111
// Add more setup options before each test is run
12-
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
12+
setupFiles: ['<rootDir>/jest.setup.js'],
1313

14-
testEnvironment: 'jest-environment-jsdom',
15-
}
14+
testEnvironment: 'node',
15+
};
1616

1717
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
18-
export default createJestConfig(config)
18+
export default createJestConfig(config);

jest.setup.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { TextDecoder, TextEncoder } from 'node:util';
2+
3+
if (!global.TextEncoder) {
4+
global.TextEncoder = TextEncoder;
5+
}
6+
7+
if (!global.TextDecoder) {
8+
global.TextDecoder = TextDecoder;
9+
}

next.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/** @type {import('next').NextConfig} */
2+
const nextConfig = {
3+
outputFileTracingIncludes: {
4+
'/': ['./node_modules/@couchbase/**/*'],
5+
'/api/user': ['./node_modules/@couchbase/**/*'],
6+
},
7+
};
8+
9+
export default nextConfig;

0 commit comments

Comments
 (0)