Skip to content

Commit 1781a2a

Browse files
committed
chore: modern bummps updates
1 parent a6707c5 commit 1781a2a

File tree

10 files changed

+1018
-996
lines changed

10 files changed

+1018
-996
lines changed

.devcontainer/devcontainer.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Node.js",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": { "VARIANT": "18-bullseye", "NODE_ENV": "docker-dev" }
6+
},
7+
"settings": {},
8+
"extensions": [
9+
"rvest.vs-code-prettier-eslint",
10+
"ZixuanChen.vitest-explorer",
11+
"wix.vscode-import-cost",
12+
"eamodio.gitlens"
13+
],
14+
"postCreateCommand": "pnpm install --ignore-scripts",
15+
"remoteUser": "node"
16+
}

.devcontainer/dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ARG VARIANT="18-bullseye"
2+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
3+
RUN su node -c "npm install -g pnpm"

.env_starter

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
PNPM_VERSION=8.1.1
2+
NODE_ENV=local

.github/workflows/node.js.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
node-version: [16.x]
16+
node-version: [18.x, 16.x, 14.x]
1717

1818
steps:
1919
- uses: actions/checkout@v2

.github/workflows/update.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
node-version: [16.x]
13+
node-version: [18.x]
1414

1515
steps:
1616
- uses: actions/checkout@v3
@@ -25,7 +25,8 @@ jobs:
2525
- run: pnpm install --no-frozen-lockfile
2626
- run: pnpm build
2727
- run: pnpm test
28-
- run: pnpm update
28+
- run: pnpm run update
29+
- run: pnpm install --no-frozen-lockfile
2930
- name: Create Pull Request
3031
uses: peter-evans/create-pull-request@v4
3132
with:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ typings/
6262
package-lock.json
6363
.dccache
6464
.husky
65+
.pnpm-store

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ ES Check is a small utility using powerful tools that [Isaac Z. Schlueter](https
203203

204204
## Contributing
205205

206-
ES Check has 3 main dependencies: [acorn](https://github.com/ternjs/acorn/), [glob](https://www.npmjs.com/package/glob), and [caporal](https://github.com/mattallty/Caporal.js). To contribute, file an [issue](https://github.com/yowainwright/es-check/issues) or submit a pull request.
206+
ES Check has 3 main dependencies: [acorn](https://github.com/ternjs/acorn/), [glob](https://www.npmjs.com/package/glob), and [caporal](https://github.com/mattallty/Caporal.js). To contribute, file an [issue](https://github.com/yowainwright/es-check/issues) or submit a pull request. To setup local development, run `./bin/setup.sh` or open the devcontainer in VSCode.
207207

208208
### Contributors
209209

bin/setup.sh

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/bin/sh
2+
3+
if [ ! -f .env ]; then
4+
cp .env_starter .env
5+
echo "created .env file from .env_starter"
6+
export $(grep -v '^#' .env | xargs)
7+
else
8+
export $(grep -v '^#' .env | xargs)
9+
fi
10+
11+
# Get .env variables
12+
[ ! -f .env ] || export $(grep -v '^#' .env | xargs)
13+
14+
# Check to see if Homebrew, Go, and Pre-commit are installed, and install it if it is not
15+
HAS_NVM=$(command -v nvm >/dev/null)
16+
HAS_PNPM=$(command -v pnpm >/dev/null)
17+
18+
19+
if $HAS_NVM; then
20+
. ~/.nvm/nvm.sh install
21+
else
22+
echo "Please install NVM or ensure your version matches the .nvmrc file"
23+
exit 1
24+
fi
25+
26+
PNPM_MSG="Please install PNPM or ensure your version matches the pnpm version within the .env file"
27+
28+
# load pnpm
29+
if $HAS_PNPM; then
30+
PNPM_LOADED_VERSION=$(command pnpm --version)
31+
if [ "$PNPM_LOADED_VERSION" != "$PNPM_VERSION" ]; then
32+
read -r -p "pnpm versions are out of snyc. Run 'npm install -g pnpm@${PNPM_VERSION}'? [Y/n]" response
33+
response=$(echo "$response" | tr '[:upper:]' '[:lower:]')
34+
if [ $response = "y" ] || [ -z $response ]; then
35+
npm install -g pnpm@$PNPM_VERSION
36+
echo 'pnpm version updated globally'
37+
else
38+
echo $PNPM_MSG
39+
exit 1
40+
fi;
41+
else
42+
echo "pnpm version is up-to-date"
43+
fi
44+
else
45+
echo $PNPM_MSG
46+
exit 1
47+
fi

0 commit comments

Comments
 (0)