Skip to content

Commit e31ab1b

Browse files
fix: lock file maintenance (#93)
BREAKING CHANGE: node.js >= 18 BREAKING CHANGE: migrate to esm nuxt 3 support
1 parent 66c277c commit e31ab1b

25 files changed

+19391
-14435
lines changed

.baserc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
{
2+
"name": "@dword-design/node",
3+
"eslintConfig": {
4+
"extends": "@dword-design/eslint-config",
5+
"rules": {
6+
"import/no-unresolved": ["error", { "ignore": ["#imports"] }]
7+
}
8+
},
29
"seeAlso": [
310
{ "repository": "nuxt-mail", "description": "Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails." },
411
{ "repository": "nuxt-route-meta", "description": "Adds Nuxt page data to route meta at build time." },

.devcontainer/devcontainer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"features": {
3+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
4+
},
5+
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20",
6+
"updateContentCommand": "pnpm install --frozen-lockfile"
7+
}

.eslintrc.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
{
2-
"extends": "@dword-design/eslint-config"
2+
"extends": "@dword-design/eslint-config",
3+
"rules": {
4+
"import/no-unresolved": [
5+
"error",
6+
{
7+
"ignore": [
8+
"#imports"
9+
]
10+
}
11+
]
12+
}
313
}

.github/workflows/build.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,67 +10,67 @@ jobs:
1010
needs: test
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v4
1414
with:
1515
lfs: true
1616
ref: ${{ github.event.pull_request.head.repo.full_name == github.repository &&
1717
github.event.pull_request.head.ref || '' }}
18-
- uses: actions/setup-node@v2
18+
- uses: actions/setup-node@v4
1919
with:
20-
node-version: 14
20+
node-version: 20
21+
- run: corepack enable
2122
- run: git config --global user.email "actions@github.com"
2223
- run: git config --global user.name "GitHub Actions"
23-
- run: yarn --frozen-lockfile
24-
- run: yarn checkUnknownFiles
25-
- run: yarn lint
24+
- run: pnpm install --frozen-lockfile
25+
- run: pnpm checkUnknownFiles
26+
- run: pnpm lint
2627
- env:
2728
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
2829
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2930
name: Push changed files
30-
run: yarn dw-ci push-changed-files
31+
run: pnpm dw-ci push-changed-files
3132
- env:
3233
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3334
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3435
if: github.ref == 'refs/heads/master'
3536
name: Release
36-
run: yarn semantic-release
37+
run: pnpm semantic-release
3738
test:
3839
needs: cancel-existing
3940
runs-on: ${{ matrix.os }}
4041
steps:
41-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v4
4243
with:
4344
fetch-depth: 0
4445
lfs: true
45-
- uses: actions/setup-node@v2
46+
- uses: actions/setup-node@v4
4647
with:
4748
node-version: ${{ matrix.node }}
48-
- run: yarn --frozen-lockfile
49-
- run: yarn test
49+
- run: corepack enable
50+
- run: pnpm install --frozen-lockfile
51+
- env:
52+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
run: pnpm test
5054
- if: failure()
51-
uses: actions/upload-artifact@v2
55+
uses: actions/upload-artifact@v3
5256
with:
5357
name: Image Snapshot Diffs
5458
path: "**/__image_snapshots__/__diff_output__"
55-
- if: matrix.os == 'ubuntu-latest' && matrix.node == 14
56-
uses: codecov/codecov-action@v2
59+
- if: matrix.os == 'ubuntu-latest' && matrix.node == 20
60+
uses: codecov/codecov-action@v3
5761
with:
58-
fail_ci_if_error: true
5962
token: ${{ secrets.CODECOV_TOKEN }}
6063
strategy:
6164
matrix:
62-
exclude:
63-
- node: 12
65+
include:
66+
- node: 18
67+
os: ubuntu-latest
68+
- node: 20
69+
os: ubuntu-latest
70+
- node: 20
6471
os: macos-latest
65-
- node: 12
72+
- node: 20
6673
os: windows-latest
67-
node:
68-
- 12
69-
- 14
70-
os:
71-
- macos-latest
72-
- windows-latest
73-
- ubuntu-latest
7474
name: build
7575
on:
7676
pull_request: {}

.github/workflows/deprecated-dependencies.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jobs:
22
run:
33
runs-on: ubuntu-latest
44
steps:
5-
- uses: actions/checkout@v2
5+
- uses: actions/checkout@v4
66
with:
77
lfs: true
88
- continue-on-error: true
@@ -20,10 +20,11 @@ jobs:
2020
update_existing: true
2121
- if: ${{ !steps.check-deprecated-js-deps.outputs.deprecated &&
2222
steps.create-deprecation-issue.outputs.number }}
23-
uses: peter-evans/close-issue@v1
23+
uses: peter-evans/close-issue@v3
2424
with:
2525
comment: Auto-closing the issue
2626
issue-number: ${{ steps.create-deprecation-issue.outputs.number }}
27+
- uses: gautamkrishnar/keepalive-workflow@v1
2728
name: deprecated-dependencies
2829
on:
2930
schedule:

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ jobs:
22
build:
33
runs-on: ubuntu-latest
44
steps:
5-
- uses: actions/checkout@v2
5+
- uses: actions/checkout@v4
66
- env:
77
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88
uses: micnncim/action-label-syncer@v1

.github/workflows/sync-metadata.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ jobs:
22
build:
33
runs-on: ubuntu-latest
44
steps:
5-
- uses: actions/checkout@v2
5+
- uses: actions/checkout@v4
66
- uses: jaid/action-sync-node-meta@v2.0.0
77
with:
88
approve: false
99
commitMessage: "fix: write GitHub metadata to package.json [{changes}]"
1010
githubToken: ${{ secrets.GITHUB_TOKEN }}
11+
- uses: gautamkrishnar/keepalive-workflow@v1
1112
name: sync-metadata
1213
on:
1314
schedule:

.gitpod.Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Need to add :latest, otherwise old versions (e.g. of node) are installed
2-
FROM gitpod/workspace-full:latest
2+
FROM gitpod/workspace-full-vnc:latest
33

44
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
55
RUN sudo apt-get install git-lfs
66
RUN git lfs install
7-
RUN echo "\nexport PATH=$(yarn global bin):\$PATH" >> /home/gitpod/.bashrc
7+
8+
# https://www.gitpod.io/docs/languages/javascript
9+
# https://github.com/gitpod-io/gitpod/issues/945
10+
RUN bash -c 'source $HOME/.nvm/nvm.sh && nvm install 20'
11+
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix
12+
813
RUN yarn global add gitpod-env-per-project @babel/node @babel/core
14+
915
RUN sudo apt-get install -y graphviz
16+
1017
RUN brew install gh
1118

1219
# Puppeteer dependencies

.gitpod.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,29 @@
11
image:
22
file: .gitpod.Dockerfile
33
tasks:
4-
- command: eval $(gitpod-env-per-project)
5-
init: git config --global user.name "Sebastian Landwehr" && git lfs pull && yarn
6-
--frozen-lockfile
4+
- before: >-
5+
echo "corepack enable" >> /home/gitpod/.bashrc
6+
7+
echo "export COREPACK_ENABLE_DOWNLOAD_PROMPT=0" >> /home/gitpod/.bashrc
8+
9+
gitpod-env-per-project >> /home/gitpod/.bashrc
10+
11+
echo "export
12+
PUPPETEER_CACHE_DIR=/workspace/nuxt-atomizer/node_modules/.cache/puppeteer"
13+
>> /home/gitpod/.bashrc
14+
15+
echo "export PLAYWRIGHT_BROWSERS_PATH=0" >> /home/gitpod/.bashrc
16+
17+
source /home/gitpod/.bashrc
18+
init: |-
19+
git config --global user.name "Sebastian Landwehr"
20+
git config diff.lfs.textconv cat
21+
git lfs pull
22+
pnpm install --frozen-lockfile
723
vscode:
824
extensions:
925
- https://sebastianlandwehr.com/vscode-extensions/karlito40.fix-irregular-whitespace-0.1.1.vsix
1026
- https://sebastianlandwehr.com/vscode-extensions/adrianwilczynski.toggle-hidden-1.0.2.vsix
1127
- octref.vetur@0.33.1
28+
- Tobermory.es6-string-html
29+
- zjcompt.es6-string-javascript

.husky/commit-msg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

44
npx commitlint --edit "$1"

0 commit comments

Comments
 (0)