Skip to content

Commit f74ae16

Browse files
fix: lock file maintenance (#269)
BREAKING CHANGE: node.js >= 20 BREAKING CHANGE: not pushing plugin anymore. probably not relevant for most. just using default addPlugin from Nuxt.
1 parent 025ccb5 commit f74ae16

25 files changed

+6030
-10634
lines changed

.baserc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"depcheckConfig": {
33
"ignoreMatches": [
4-
"playwright-chromium"
4+
"@playwright/browser-chromium"
55
]
66
},
77
"name": "@dword-design/nuxt-module",

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"postCreateCommand": "pnpm install --frozen-lockfile"
2+
"postCreateCommand": "bash .devcontainer/postcreate.sh"
33
}

.devcontainer/postcreate.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Doppler ######################################################
2+
# See https://docs.doppler.com/docs/install-cli#installation
3+
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg
4+
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | sudo gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg
5+
echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | sudo tee /etc/apt/sources.list.d/doppler-cli.list
6+
sudo apt-get update && sudo apt-get install doppler
7+
# ##############################################################
8+
9+
pnpm install --frozen-lockfile

.github/workflows/build.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1+
concurrency:
2+
cancel-in-progress: true
3+
group: ${{ github.workflow }}-${{ github.ref }}
14
jobs:
2-
cancel-existing:
3-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
4-
runs-on: ubuntu-latest
5-
steps:
6-
- env:
7-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8-
uses: rokroskar/workflow-run-cleanup-action@v0.3.3
95
release:
106
needs: test
117
runs-on: ubuntu-latest
@@ -36,12 +32,10 @@ jobs:
3632
name: Release
3733
run: pnpm semantic-release
3834
test:
39-
needs: cancel-existing
4035
runs-on: ${{ matrix.os }}
4136
steps:
4237
- uses: actions/checkout@v4
4338
with:
44-
fetch-depth: 0
4539
lfs: true
4640
- uses: actions/setup-node@v4
4741
with:
@@ -51,26 +45,24 @@ jobs:
5145
- run: pnpm install --frozen-lockfile
5246
- env:
5347
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54-
run: pnpm test
48+
run: pnpm verify
5549
- if: always()
5650
uses: actions/upload-artifact@v4
5751
with:
5852
if-no-files-found: ignore
59-
name: Images from tests
60-
path: |-
61-
**/__image_snapshots__/__diff_output__
62-
test-results/*/**
53+
name: Data from tests
54+
path: test-results/*/**
6355
- if: matrix.os == 'ubuntu-latest' && matrix.node == 20
64-
uses: codecov/codecov-action@v3
56+
uses: codecov/codecov-action@v5
6557
with:
6658
token: ${{ secrets.CODECOV_TOKEN }}
6759
strategy:
6860
matrix:
6961
include:
70-
- node: 18
71-
os: ubuntu-latest
7262
- node: 20
7363
os: ubuntu-latest
64+
- node: 22
65+
os: ubuntu-latest
7466
- node: 20
7567
os: macos-latest
7668
- node: 20

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
.DS_Store
22
/.env.json
3+
/.nuxt
34
/.nyc_output
45
/.test.env.json
6+
/codecov
7+
/codecov.SHA256SUM
8+
/codecov.SHA256SUM.sig
59
/coverage
610
/dist
711
/node_modules
12+
/test-results

.gitpod.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@ tasks:
44
- before: >-
55
echo "corepack enable" >> /home/gitpod/.bashrc
66
7+
8+
# Prevent this prompt:
9+
10+
# pnpm install --frozen-lockfile
11+
12+
# ! Corepack is about to download
13+
https://registry.npmjs.org/pnpm/-/pnpm-10.7.1.tgz
14+
15+
# ? Do you want to continue? [Y/n]
16+
717
echo "export COREPACK_ENABLE_DOWNLOAD_PROMPT=0" >> /home/gitpod/.bashrc
818
19+
920
gitpod-env-per-project >> /home/gitpod/.bashrc
1021
1122
echo "export

.renovaterc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
{
2323
"datasourceTemplate": "github-tags",
2424
"fileMatch": [
25-
"\\.js$"
25+
"\\.ts$"
2626
],
2727
"matchStrings": [
2828
"(^|[^\\w])gitHubAction`(?<depName>.*?)@v(?<currentValue>.*?)`"
@@ -33,7 +33,7 @@
3333
"datasourceTemplate": "node-version",
3434
"depNameTemplate": "node",
3535
"fileMatch": [
36-
"\\.js$"
36+
"\\.ts$"
3737
],
3838
"matchStrings": [
3939
"(^|[^\\w])nodejsVersion`(?<currentValue>.*?)`"

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,19 @@
1313
".gitpod.yml": true,
1414
".husky": true,
1515
".npmrc": true,
16+
".nuxt": true,
1617
".nyc_output": true,
1718
".releaserc.json": true,
1819
".renovaterc.json": true,
1920
".vscode": true,
2021
"CHANGELOG.md": true,
2122
"LICENSE.md": true,
22-
"babel.config.json": true,
23+
"codecov": true,
24+
"codecov.SHA256SUM": true,
25+
"codecov.SHA256SUM.sig": true,
2326
"coverage": true,
2427
"dist": true,
25-
"eslint.config.js": true,
28+
"eslint.config.ts": true,
2629
"node_modules": true,
2730
"pnpm-lock.yaml": true
2831
},

README.md

Lines changed: 43 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -3,49 +3,49 @@
33
<!-- /TITLE -->
44

55
<!-- BADGES/ -->
6-
<p>
7-
<a href="https://npmjs.org/package/nuxt-mail">
8-
<img
9-
src="https://img.shields.io/npm/v/nuxt-mail.svg"
10-
alt="npm version"
11-
>
12-
</a><img src="https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue" alt="Linux macOS Windows compatible"><a href="https://github.com/dword-design/nuxt-mail/actions">
13-
<img
14-
src="https://github.com/dword-design/nuxt-mail/workflows/build/badge.svg"
15-
alt="Build status"
16-
>
17-
</a><a href="https://codecov.io/gh/dword-design/nuxt-mail">
18-
<img
19-
src="https://codecov.io/gh/dword-design/nuxt-mail/branch/master/graph/badge.svg"
20-
alt="Coverage status"
21-
>
22-
</a><a href="https://david-dm.org/dword-design/nuxt-mail">
23-
<img src="https://img.shields.io/david/dword-design/nuxt-mail" alt="Dependency status">
24-
</a><img src="https://img.shields.io/badge/renovate-enabled-brightgreen" alt="Renovate enabled"><br/><a href="https://gitpod.io/#https://github.com/dword-design/nuxt-mail">
25-
<img
26-
src="https://gitpod.io/button/open-in-gitpod.svg"
27-
alt="Open in Gitpod"
28-
width="114"
29-
>
30-
</a><a href="https://www.buymeacoffee.com/dword">
31-
<img
32-
src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg"
33-
alt="Buy Me a Coffee"
34-
width="114"
35-
>
36-
</a><a href="https://paypal.me/SebastianLandwehr">
37-
<img
38-
src="https://sebastianlandwehr.com/images/paypal.svg"
39-
alt="PayPal"
40-
width="163"
41-
>
42-
</a><a href="https://www.patreon.com/dworddesign">
43-
<img
44-
src="https://sebastianlandwehr.com/images/patreon.svg"
45-
alt="Patreon"
46-
width="163"
47-
>
48-
</a>
6+
<p>
7+
<a href="https://npmjs.org/package/nuxt-mail">
8+
<img
9+
src="https://img.shields.io/npm/v/nuxt-mail.svg"
10+
alt="npm version"
11+
>
12+
</a><img src="https://img.shields.io/badge/os-linux%20%7C%C2%A0macos%20%7C%C2%A0windows-blue" alt="Linux macOS Windows compatible"><a href="https://github.com/dword-design/nuxt-mail/actions">
13+
<img
14+
src="https://github.com/dword-design/nuxt-mail/workflows/build/badge.svg"
15+
alt="Build status"
16+
>
17+
</a><a href="https://codecov.io/gh/dword-design/nuxt-mail">
18+
<img
19+
src="https://codecov.io/gh/dword-design/nuxt-mail/branch/master/graph/badge.svg"
20+
alt="Coverage status"
21+
>
22+
</a><a href="https://david-dm.org/dword-design/nuxt-mail">
23+
<img src="https://img.shields.io/david/dword-design/nuxt-mail" alt="Dependency status">
24+
</a><img src="https://img.shields.io/badge/renovate-enabled-brightgreen" alt="Renovate enabled"><br/><a href="https://gitpod.io/#https://github.com/dword-design/nuxt-mail">
25+
<img
26+
src="https://gitpod.io/button/open-in-gitpod.svg"
27+
alt="Open in Gitpod"
28+
width="114"
29+
>
30+
</a><a href="https://www.buymeacoffee.com/dword">
31+
<img
32+
src="https://www.buymeacoffee.com/assets/img/guidelines/download-assets-sm-2.svg"
33+
alt="Buy Me a Coffee"
34+
width="114"
35+
>
36+
</a><a href="https://paypal.me/SebastianLandwehr">
37+
<img
38+
src="https://sebastianlandwehr.com/images/paypal.svg"
39+
alt="PayPal"
40+
width="163"
41+
>
42+
</a><a href="https://www.patreon.com/dworddesign">
43+
<img
44+
src="https://sebastianlandwehr.com/images/patreon.svg"
45+
alt="Patreon"
46+
width="163"
47+
>
48+
</a>
4949
</p>
5050
<!-- /BADGES -->
5151

@@ -164,53 +164,6 @@ export default {
164164
</script>
165165
```
166166

167-
## Nuxt 2
168-
169-
For Nuxt 2, you need to install [@nuxtjs/axios](https://www.npmjs.com/package/@nuxtjs/axios) and add it to your module list before `nuxt-mail`:
170-
171-
```js
172-
// nuxt.config.js
173-
export default {
174-
modules: [
175-
[
176-
'@nuxtjs/axios',
177-
['nuxt-mail', { /* ... */ }],
178-
}],
179-
],
180-
}
181-
```
182-
183-
Then you can use the injected variable like so:
184-
185-
```html
186-
<script>
187-
export default {
188-
methods: {
189-
sendEmail() {
190-
this.$mail.send({
191-
from: 'John Doe',
192-
subject: 'Incredible',
193-
text: 'This is an incredible test message',
194-
})
195-
},
196-
},
197-
}
198-
</script>
199-
```
200-
201-
### Note about production use
202-
203-
When you use `nuxt-mail` in production and you configured a reverse proxy that hides your localhost behind a domain, you need to tell `@nuxt/axios` which base URL you are using. Otherwise `nuxt-mail` won't find the send route. Refer to [@nuxt/axios options](https://axios.nuxtjs.org/options) on how to do that. The easiest option is to set the `API_URL` environment variable, or set something else in your `nuxt.config.js`:
204-
205-
```js
206-
// nuxt.config.js
207-
export default {
208-
axios: {
209-
baseURL: process.env.BASE_URL,
210-
},
211-
}
212-
```
213-
214167
## Multiple message configs
215168

216169
It is also possible to provide multiple message configurations by changing the `message` config into an array.

babel.config.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)