Skip to content

Commit 99732d3

Browse files
fix: lock file maintenance (#87)
BREAKING CHANGE: drop node 12 support, move to esm
1 parent 5340430 commit 99732d3

File tree

10 files changed

+4767
-2970
lines changed

10 files changed

+4767
-2970
lines changed

.baserc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"name": "@dword-design/node",
23
"seeAlso": [
34
{ "repository": "output-files", "description": "Output a tree of files and directories by providing an object. Especially useful for testing with real files." },
45
{ "repository": "with-local-tmp-dir", "description": "Creates a temporary folder inside cwd, cds inside the folder, runs a function, and removes the folder. Especially useful for testing." },

.github/workflows/build.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ jobs:
1010
needs: test
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
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@v3
1919
with:
20-
node-version: 14
20+
node-version: 16
2121
- run: git config --global user.email "[email protected]"
2222
- run: git config --global user.name "GitHub Actions"
2323
- run: yarn --frozen-lockfile
@@ -38,39 +38,39 @@ jobs:
3838
needs: cancel-existing
3939
runs-on: ${{ matrix.os }}
4040
steps:
41-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v3
4242
with:
4343
fetch-depth: 0
4444
lfs: true
45-
- uses: actions/setup-node@v2
45+
- uses: actions/setup-node@v3
4646
with:
4747
node-version: ${{ matrix.node }}
4848
- run: yarn --frozen-lockfile
49-
- run: yarn test
49+
- env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
run: yarn test
5052
- if: failure()
51-
uses: actions/upload-artifact@v2
53+
uses: actions/upload-artifact@v3
5254
with:
5355
name: Image Snapshot Diffs
5456
path: "**/__image_snapshots__/__diff_output__"
55-
- if: matrix.os == 'ubuntu-latest' && matrix.node == 14
56-
uses: codecov/codecov-action@v2
57+
- if: matrix.os == 'ubuntu-latest' && matrix.node == 16
58+
uses: codecov/codecov-action@v3
5759
with:
58-
fail_ci_if_error: true
5960
token: ${{ secrets.CODECOV_TOKEN }}
6061
strategy:
6162
matrix:
62-
exclude:
63-
- node: 12
63+
include:
64+
- node: 14
65+
os: ubuntu-latest
66+
- node: 16
67+
os: ubuntu-latest
68+
- node: 18
69+
os: ubuntu-latest
70+
- node: 16
6471
os: macos-latest
65-
- node: 12
72+
- node: 16
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@v3
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@v2
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@v3
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@v3
66
- uses: jaid/[email protected]
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ FROM gitpod/workspace-full:latest
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+
8+
# https://www.gitpod.io/docs/languages/javascript
9+
RUN bash -c 'VERSION="16" && source $HOME/.nvm/nvm.sh && nvm install $VERSION && nvm use $VERSION && nvm alias default $VERSION'
10+
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix
11+
712
RUN echo "\nexport PATH=$(yarn global bin):\$PATH" >> /home/gitpod/.bashrc
13+
814
RUN yarn global add gitpod-env-per-project @babel/node @babel/core
15+
916
RUN sudo apt-get install -y graphviz
17+
1018
RUN brew install gh
1119

1220
# Puppeteer dependencies

.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"

package.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@
1919
"funding": "https://github.com/sponsors/dword-design",
2020
"license": "MIT",
2121
"author": "Sebastian Landwehr <[email protected]>",
22+
"type": "module",
23+
"exports": "./dist/index.js",
2224
"main": "dist/index.js",
2325
"files": [
2426
"dist"
2527
],
2628
"scripts": {
2729
"checkUnknownFiles": "base checkUnknownFiles",
2830
"commit": "base commit",
31+
"depcheck": "base depcheck",
2932
"dev": "base dev",
3033
"lint": "base lint",
3134
"prepare": "base prepare",
@@ -37,20 +40,21 @@
3740
"jest-snapshot": "^27.0.0"
3841
},
3942
"devDependencies": {
40-
"@dword-design/base": "^8.0.0",
43+
"@dword-design/base": "^9.2.3",
4144
"@dword-design/functions": "^4.0.0",
45+
"@dword-design/tester": "^2.0.12",
46+
"@dword-design/tester-plugin-tmp-dir": "^2.1.7",
4247
"depcheck-package-name": "^2.0.0",
43-
"execa": "^5.0.0",
44-
"expect": "^27.0.0",
45-
"expect-mocha-snapshot": "dword-design/expect-mocha-snapshot#fork",
48+
"execa": "^6.1.0",
49+
"expect": "^29.3.1",
50+
"expect-mocha-snapshot": "^2.1.5",
4651
"fs-extra": "^10.0.0",
4752
"jest-image-matcher": "^2.0.0",
4853
"mocha": "^9.0.0",
49-
"sharp": "^0.29.0",
50-
"with-local-tmp-dir": "^4.0.0"
54+
"sharp": "^0.31.3"
5155
},
5256
"engines": {
53-
"node": ">=12"
57+
"node": ">=14"
5458
},
5559
"publishConfig": {
5660
"access": "public"

0 commit comments

Comments
 (0)