Skip to content

Commit 0791635

Browse files
author
Corentin Mors
authored
Upgrade to node22 (#296)
This is a major NodeJS version bump to v22 and includes version upgrades for multiple dependencies.
1 parent 07f4293 commit 0791635

Some content is hidden

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

48 files changed

+5924
-3862
lines changed

.github/workflows/documentation-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: 18
24+
node-version: 22
2525

2626
- name: Build
2727
run: |

.github/workflows/manual-test-release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ jobs:
1717
- host: ubuntu-latest
1818
target: linux-x64
1919
runs-on: ${{ matrix.settings.host }}
20-
name: dev build - ${{ matrix.settings.target }} - node@18
20+
name: dev build - ${{ matrix.settings.target }} - node@22
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Use Node.js
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: 18.x
26+
node-version: 22.x
2727

2828
- if: matrix.settings.host == 'macos-14'
2929
run: brew install python-setuptools
@@ -35,7 +35,7 @@ jobs:
3535
- run: yarn workspaces focus --all --production
3636
# package final binaries
3737
- run: |
38-
yarn dlx @yao-pkg/pkg@5.12.0 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
38+
yarn dlx @yao-pkg/pkg@6.1.1 ./dist -t node22-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
3939
4040
- name: Archive binary artifact
4141
uses: actions/upload-artifact@v4

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ jobs:
2020
- host: ubuntu-latest
2121
target: linux-x64
2222
runs-on: ${{ matrix.settings.host }}
23-
name: dev build - ${{ matrix.settings.target }} - node@18
23+
name: dev build - ${{ matrix.settings.target }} - node@22
2424
steps:
2525
- uses: actions/checkout@v4
2626
- name: Use Node.js
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: 18.x
29+
node-version: 22.x
3030

3131
- if: matrix.settings.host == 'macos-14'
3232
run: brew install python-setuptools
@@ -38,7 +38,7 @@ jobs:
3838
- run: yarn workspaces focus --all --production
3939
# package final binaries
4040
- run: |
41-
yarn dlx @yao-pkg/pkg@5.12.0 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
41+
yarn dlx @yao-pkg/pkg@6.1.1 ./dist -t node22-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
4242
4343
- name: Archive binary artifact
4444
uses: actions/upload-artifact@v4

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Use Node.js
1717
uses: actions/setup-node@v4
1818
with:
19-
node-version: 18.x
19+
node-version: 22.x
2020
- run: yarn
2121
- run: yarn run lint
2222
- run: yarn run test

.yarn/releases/yarn-4.2.2.cjs

-894
This file was deleted.

.yarn/releases/yarn-4.5.1.cjs

+2,056
Large diffs are not rendered by default.

.yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.2.2.cjs
7+
yarnPath: .yarn/releases/yarn-4.5.1.cjs

documentation/components/player.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ export const YoutubePlayer = (props: { videoId: string }) => {
1313
></iframe>
1414
);
1515
};
16+
17+
export default YoutubePlayer;

documentation/next-env.d.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/image-types/global" />
3+
4+
// NOTE: This file should not be edited
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

documentation/next.config.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
const withNextra = require('nextra')({
1+
import nextra from 'nextra';
2+
3+
const withNextra = nextra({
24
theme: 'nextra-theme-docs',
3-
themeConfig: './theme.config.jsx',
5+
themeConfig: './theme.config.jsx'
46
});
57

68
let assetPrefix = '';
79
let basePath = '';
810

9-
module.exports = {
10-
...withNextra(),
11+
export default withNextra({
1112
images: {
1213
unoptimized: true,
1314
},
1415
assetPrefix: assetPrefix,
1516
basePath: basePath,
1617
output: 'export'
17-
};
18+
});

documentation/package.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
{
22
"name": "@dashlane/cli-documentation",
3-
"packageManager": "yarn@4.2.2",
3+
"type": "module",
4+
"packageManager": "yarn@4.5.1",
45
"dependencies": {
5-
"next": "^14.2.10",
6-
"nextra": "^2.13.4",
7-
"nextra-theme-docs": "^2.13.4",
6+
"next": "^15.0.3",
7+
"nextra": "^3.2.3",
8+
"nextra-theme-docs": "^3.2.3",
89
"react": "^18.3.1",
910
"react-dom": "^18.3.1",
10-
"sharp": "^0.33.4"
11+
"sharp": "^0.33.5"
12+
},
13+
"devDependencies": {
14+
"@types/react": "18.3.12"
1115
}
1216
}

documentation/pages/_app.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import type { AppProps } from 'next/app';
2+
3+
export default function MyApp({ Component, pageProps }: AppProps) {
4+
return <Component {...pageProps} />;
5+
}

documentation/pages/_meta.json documentation/pages/_meta.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
export default {
22
"index": {
33
"title": "Introduction",
44
"theme": {

documentation/pages/business/_meta.json

-7
This file was deleted.

documentation/pages/business/_meta.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export default {
2+
index: 'Get Started',
3+
'audit-logs': 'Audit Logs',
4+
dwi: 'Dark Web Insights',
5+
members: 'Members',
6+
reports: 'Reports',
7+
};

documentation/pages/index.mdx

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { Card, Cards } from 'nextra-theme-docs';
1+
import { Cards } from 'nextra/components';
22

33
# Documentation
44

55
<Cards>
6-
<Card title="⚙️ Setup the CLI" href="/install" />
7-
<Card title="💬 Discuss with us" href="https://github.com/Dashlane/dashlane-cli/discussions" target="_blank" />
8-
<Card title="👩‍💻 Contribute on Github" href="https://github.com/Dashlane/dashlane-cli" target="_blank" />
6+
<Cards.Card title="⚙️ Setup the CLI" href="/install" />
7+
<Cards.Card
8+
title="💬 Discuss with us"
9+
href="https://github.com/Dashlane/dashlane-cli/discussions"
10+
target="_blank"
11+
/>
12+
<Cards.Card title="👩‍💻 Contribute on Github" href="https://github.com/Dashlane/dashlane-cli" target="_blank" />
913
</Cards>
1014

1115
![Dashlane CLI](../public/main.png)
@@ -17,7 +21,7 @@ Dashlane CLI also allows you to access team admin related features such as acces
1721
This documentation is separated in three parts:
1822

1923
<Cards>
20-
<Card title="👤 Personal Commands" href="/personal" />
21-
<Card title="👔 Business Commands" href="/business" />
22-
<Card title="🧩 Integrations" href="/integrations" />
24+
<Cards.Card title="👤 Personal Commands" href="/personal" />
25+
<Cards.Card title="👔 Business Commands" href="/business" />
26+
<Cards.Card title="🧩 Integrations" href="/integrations" />
2327
</Cards>

documentation/pages/install.mdx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Callout, Tab, Tabs } from 'nextra-theme-docs'
1+
import { Callout, Tabs } from 'nextra/components'
22

33
# Install
44

@@ -11,7 +11,7 @@ You can either install it using :
1111
- manually with [Yarn](https://yarnpkg.com/)
1212

1313
<Tabs items={['Homebrew', 'Packaged Executables (x64 only)', 'Manually with Yarn']}>
14-
<Tab>
14+
<Tabs.Tab>
1515
You can install the Dashlane CLI using [Homebrew](https://brew.sh/), a package manager for __macOS__ and __Linux__.
1616

1717
To install Homebrew, run the following command in your terminal:
@@ -27,8 +27,8 @@ You can either install it using :
2727
```
2828

2929
The CLI is now installed on your machine, it will be updated automatically when a new version is released.
30-
</Tab>
31-
<Tab>
30+
</Tabs.Tab>
31+
<Tabs.Tab>
3232
Head to the [releases page](https://github.com/Dashlane/dashlane-cli/releases) and download the latest version of the CLI for your platform (Windows, macOS or Linux).
3333

3434
You may need to mark the binary as executable (on macOS and Linux):
@@ -60,8 +60,8 @@ You can either install it using :
6060
To do so, go to `System Preferences > Security & Privacy > General` and click on "Allow Anyway" next to the message "dcli-macos was blocked from use because it is not from an identified developer".
6161

6262
You will need to get the latest version of the CLI manually by downloading the latest release and replacing the binary in your bin folder.
63-
</Tab>
64-
<Tab>
63+
</Tabs.Tab>
64+
<Tabs.Tab>
6565
<Callout type="warning">We do not recommend the manual install for personal computers, if you plan to use the local keychain, as the NodeJS process will be the owner of your secrets, we recommend to use a packaged version.</Callout>
6666

6767
This method is available on every environment that supports [Node.js](https://nodejs.org/en/) and Yarn.
@@ -87,7 +87,7 @@ You can either install it using :
8787
```
8888

8989
Make sure to pull the latest changes and rebuild the project to get the latest version of the CLI.
90-
</Tab>
90+
</Tabs.Tab>
9191

9292
</Tabs>
9393

documentation/pages/integrations.mdx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { Card, Cards } from 'nextra/components';
1+
import { Cards } from 'nextra/components';
22

33
# Integrations
44

55
We support several integrations with popular services and tools.
66
Explore the integrations below to learn how to improve your development workflows.
77

88
<Cards>
9-
<Card title="🐙 GitHub Action" href="/integrations/github-action" />
10-
<Card title="💻 VS Code Extension" href="/integrations/vscode" />
11-
<Card title="🗂️ Logs to SIEM" href="/integrations/siem" />
9+
<Cards.Card title="🐙 GitHub Action" href="/integrations/github-action" />
10+
<Cards.Card title="💻 VS Code Extension" href="/integrations/vscode" />
11+
<Cards.Card title="🗂️ Logs to SIEM" href="/integrations/siem" />
1212
</Cards>

documentation/pages/integrations/_meta.json

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
'github-action': 'GitHub Action',
3+
vscode: 'Visual Studio Code',
4+
siem: 'SIEM',
5+
};

documentation/pages/personal.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Card, Cards } from 'nextra-theme-docs';
1+
import { Cards } from 'nextra/components';
22

33
# Get started with Personal Commands
44

@@ -7,9 +7,9 @@ Accessing your personal vault allows you to view your passwords, secure notes an
77
![Dashlane CLI examples](../public/cli-examples.png)
88

99
<Cards>
10-
<Card title="🔑 Authentication" href="/personal/authentication" />
11-
<Card title="🔒 Accessing your vault" href="/personal/vault" />
12-
<Card title="📱 Manage your devices" href="/personal/devices" />
13-
<Card title="🔎 Load your secrets" href="/personal/secrets/read" />
14-
<Card title="🛟 Backup your local vault" href="/personal/backup" />
10+
<Cards.Card title="🔑 Authentication" href="/personal/authentication" />
11+
<Cards.Card title="🔒 Accessing your vault" href="/personal/vault" />
12+
<Cards.Card title="📱 Manage your devices" href="/personal/devices" />
13+
<Cards.Card title="🔎 Load your secrets" href="/personal/secrets/read" />
14+
<Cards.Card title="🛟 Backup your local vault" href="/personal/backup" />
1515
</Cards>

documentation/pages/personal/_meta.json

-8
This file was deleted.

documentation/pages/personal/_meta.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export default {
2+
authentication: 'Authentication',
3+
devices: 'Managing your Devices',
4+
vault: 'Accessing your Vault',
5+
secrets: 'Load secrets',
6+
backup: 'Backup your local Vault',
7+
logout: 'Logout',
8+
};

documentation/pages/personal/secrets/_meta.json

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
read: 'Read secrets references',
3+
exec: 'Load secrets into environment variables',
4+
inject: 'Load secrets into templated files',
5+
};

documentation/pages/personal/secrets/exec.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Steps } from 'nextra/components';
2-
import { YoutubePlayer } from '../../../components/player';
2+
import { YoutubePlayer } from '../../../components/player.tsx';
33

44
# Load secrets into environment variables
55

documentation/pages/personal/secrets/inject.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Steps, Callout } from 'nextra/components';
2-
import { YoutubePlayer } from '../../../components/player';
2+
import { YoutubePlayer } from '../../../components/player.tsx';
33

44
# Load secrets into templated files
55

documentation/pages/personal/secrets/read.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { YoutubePlayer } from '../../../components/player';
1+
import { YoutubePlayer } from '../../../components/player.tsx';
22

33
# Read secrets references
44

documentation/pages/personal/vault.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Callout } from 'nextra/components';
2-
import { YoutubePlayer } from '../../components/player';
2+
import YoutubePlayer from '../../components/player.tsx';
33

44
# Accessing your Vault
55

documentation/pages/troubleshooting.mdx

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Tab, Tabs } from 'nextra-theme-docs';
1+
import { Tabs } from 'nextra/components';
22

33
# Troubleshooting
44

@@ -22,27 +22,27 @@ In NodeJS the list of certificate authorities is hardcoded, read more here: [nod
2222
You can use an environment variable to add custom certs ([see documentation](https://nodejs.org/docs/latest-v16.x/api/cli.html#node_extra_ca_certsfile)):
2323

2424
<Tabs items={['Bash', 'Powershell', 'Batch']}>
25-
<Tab>
25+
<Tabs.Tab>
2626

2727
```sh copy
2828
export NODE_EXTRA_CA_CERTS="/path/to/cert.pem"
2929
```
3030

31-
</Tab>
32-
<Tab>
31+
</Tabs.Tab>
32+
<Tabs.Tab>
3333

3434
```powershell copy
3535
$Env:NODE_EXTRA_CA_CERTS="C:\certs\root.crt"
3636
```
3737

38-
</Tab>
39-
<Tab>
38+
</Tabs.Tab>
39+
<Tabs.Tab>
4040

4141
```batch copy
4242
set NODE_EXTRA_CA_CERTS="C:\certs\root.crt"
4343
```
4444

45-
</Tab>
45+
</Tabs.Tab>
4646

4747
</Tabs>
4848

documentation/theme.config.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
link: 'https://github.com/Dashlane/dashlane-cli'
1515
},
1616
docsRepositoryBase: 'https://github.com/Dashlane/dashlane-cli/blob/master/documentation',
17-
footer: { text: (<span>Apache {new Date().getFullYear()} © Dashlane, Inc.</span>) },
17+
footer: { content: (<span>Apache {new Date().getFullYear()} © Dashlane, Inc.</span>) },
1818
useNextSeoProps() {
1919
const { asPath } = useRouter();
2020
if (asPath !== '/') {

0 commit comments

Comments
 (0)