Skip to content

Commit

Permalink
fix: lock file maintenance (#93)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: node.js >= 18
BREAKING CHANGE: migrate to esm
nuxt 3 support
  • Loading branch information
renovate[bot] authored Aug 18, 2024
1 parent 66c277c commit e31ab1b
Show file tree
Hide file tree
Showing 25 changed files with 19,391 additions and 14,435 deletions.
7 changes: 7 additions & 0 deletions .baserc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{
"name": "@dword-design/node",
"eslintConfig": {
"extends": "@dword-design/eslint-config",
"rules": {
"import/no-unresolved": ["error", { "ignore": ["#imports"] }]
}
},
"seeAlso": [
{ "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." },
{ "repository": "nuxt-route-meta", "description": "Adds Nuxt page data to route meta at build time." },
Expand Down
7 changes: 7 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20",
"updateContentCommand": "pnpm install --frozen-lockfile"
}
12 changes: 11 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"extends": "@dword-design/eslint-config"
"extends": "@dword-design/eslint-config",
"rules": {
"import/no-unresolved": [
"error",
{
"ignore": [
"#imports"
]
}
]
}
}
52 changes: 26 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,67 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
lfs: true
ref: ${{ github.event.pull_request.head.repo.full_name == github.repository &&
github.event.pull_request.head.ref || '' }}
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
- run: corepack enable
- run: git config --global user.email "actions@github.com"
- run: git config --global user.name "GitHub Actions"
- run: yarn --frozen-lockfile
- run: yarn checkUnknownFiles
- run: yarn lint
- run: pnpm install --frozen-lockfile
- run: pnpm checkUnknownFiles
- run: pnpm lint
- env:
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Push changed files
run: yarn dw-ci push-changed-files
run: pnpm dw-ci push-changed-files
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
if: github.ref == 'refs/heads/master'
name: Release
run: yarn semantic-release
run: pnpm semantic-release
test:
needs: cancel-existing
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: yarn --frozen-lockfile
- run: yarn test
- run: corepack enable
- run: pnpm install --frozen-lockfile
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm test
- if: failure()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Image Snapshot Diffs
path: "**/__image_snapshots__/__diff_output__"
- if: matrix.os == 'ubuntu-latest' && matrix.node == 14
uses: codecov/codecov-action@v2
- if: matrix.os == 'ubuntu-latest' && matrix.node == 20
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
strategy:
matrix:
exclude:
- node: 12
include:
- node: 18
os: ubuntu-latest
- node: 20
os: ubuntu-latest
- node: 20
os: macos-latest
- node: 12
- node: 20
os: windows-latest
node:
- 12
- 14
os:
- macos-latest
- windows-latest
- ubuntu-latest
name: build
on:
pull_request: {}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/deprecated-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
lfs: true
- continue-on-error: true
Expand All @@ -20,10 +20,11 @@ jobs:
update_existing: true
- if: ${{ !steps.check-deprecated-js-deps.outputs.deprecated &&
steps.create-deprecation-issue.outputs.number }}
uses: peter-evans/close-issue@v1
uses: peter-evans/close-issue@v3
with:
comment: Auto-closing the issue
issue-number: ${{ steps.create-deprecation-issue.outputs.number }}
- uses: gautamkrishnar/keepalive-workflow@v1
name: deprecated-dependencies
on:
schedule:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: micnncim/action-label-syncer@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/sync-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: jaid/action-sync-node-meta@v2.0.0
with:
approve: false
commitMessage: "fix: write GitHub metadata to package.json [{changes}]"
githubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: gautamkrishnar/keepalive-workflow@v1
name: sync-metadata
on:
schedule:
Expand Down
11 changes: 9 additions & 2 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Need to add :latest, otherwise old versions (e.g. of node) are installed
FROM gitpod/workspace-full:latest
FROM gitpod/workspace-full-vnc:latest

RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
RUN sudo apt-get install git-lfs
RUN git lfs install
RUN echo "\nexport PATH=$(yarn global bin):\$PATH" >> /home/gitpod/.bashrc

# https://www.gitpod.io/docs/languages/javascript
# https://github.com/gitpod-io/gitpod/issues/945
RUN bash -c 'source $HOME/.nvm/nvm.sh && nvm install 20'
RUN echo "nvm use default &>/dev/null" >> ~/.bashrc.d/51-nvm-fix

RUN yarn global add gitpod-env-per-project @babel/node @babel/core

RUN sudo apt-get install -y graphviz

RUN brew install gh

# Puppeteer dependencies
Expand Down
24 changes: 21 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
image:
file: .gitpod.Dockerfile
tasks:
- command: eval $(gitpod-env-per-project)
init: git config --global user.name "Sebastian Landwehr" && git lfs pull && yarn
--frozen-lockfile
- before: >-
echo "corepack enable" >> /home/gitpod/.bashrc
echo "export COREPACK_ENABLE_DOWNLOAD_PROMPT=0" >> /home/gitpod/.bashrc
gitpod-env-per-project >> /home/gitpod/.bashrc
echo "export
PUPPETEER_CACHE_DIR=/workspace/nuxt-atomizer/node_modules/.cache/puppeteer"
>> /home/gitpod/.bashrc
echo "export PLAYWRIGHT_BROWSERS_PATH=0" >> /home/gitpod/.bashrc
source /home/gitpod/.bashrc
init: |-
git config --global user.name "Sebastian Landwehr"
git config diff.lfs.textconv cat
git lfs pull
pnpm install --frozen-lockfile
vscode:
extensions:
- https://sebastianlandwehr.com/vscode-extensions/karlito40.fix-irregular-whitespace-0.1.1.vsix
- https://sebastianlandwehr.com/vscode-extensions/adrianwilczynski.toggle-hidden-1.0.2.vsix
- octref.vetur@0.33.1
- Tobermory.es6-string-html
- zjcompt.es6-string-javascript
4 changes: 2 additions & 2 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; }
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; }
git lfs post-checkout "$@"
2 changes: 1 addition & 1 deletion .husky/post-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; }
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; }
git lfs post-commit "$@"
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; }
git lfs post-merge "$@"
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; }
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; }
git lfs pre-push "$@"
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node-linker=hoisted
24 changes: 15 additions & 9 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
":semanticCommits",
":semanticPrefixFix"
],
"ignorePaths": [
".github/workflows/build.yml"
"gitIgnoredAuthors": [
"actions@github.com"
],
"github-actions": {
"enabled": false
},
"labels": [
"maintenance"
],
Expand All @@ -14,14 +17,17 @@
"enabled": true,
"semanticCommitType": "chore"
},
"packageRules": [
"rangeStrategy": "replace",
"regexManagers": [
{
"automerge": true,
"matchCurrentVersion": ">=1.0.0",
"matchUpdateTypes": [
"minor",
"patch"
]
"datasourceTemplate": "github-tags",
"fileMatch": [
"\\.js$"
],
"matchStrings": [
"(^|\\s)gitHubAction`(?<depName>.*?)@v(?<currentValue>.*?)`"
],
"versioningTemplate": "npm"
}
],
"semanticCommitScope": null
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
".babelrc.json": true,
".commitlintrc.json": true,
".cz.json": true,
".devcontainer": true,
".editorconfig": true,
".eslintrc.json": true,
".gitattributes": true,
Expand All @@ -16,12 +17,13 @@
".nyc_output": true,
".releaserc.json": true,
".renovaterc.json": true,
".vscode": true,
"CHANGELOG.md": true,
"LICENSE.md": true,
"coverage": true,
"dist": true,
"node_modules": true,
"yarn.lock": true
"pnpm-lock.yaml": true
},
"workbench.editor.enablePreview": false
}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Copyright &copy; Sebastian Landwehr <info@sebastianlandwehr.com>

and licensed under:

[MIT License](https://opensource.org/licenses/MIT)
[MIT License](https://opensource.org/license/mit/)

## MIT License

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Also check out the demo at [CodeSandbox](https://codesandbox.io/s/demo-nuxt-atom

## Options

You can customize Atomic CSS by adding options either to the module or top-level options. It takes the same options as [webpack-atomizer-loader](https://github.com/acss-io/webpack-atomizer-loader#atomic-css-configuration).
You can customize Atomic CSS by adding options either to the module, the top-level `atomizer` options object or an `atomizer.config.js` file. The merge order is the following: `module` > top-level > `atomizer.config.js`.

```js
export default {
Expand Down Expand Up @@ -168,5 +168,5 @@ Thanks a lot for your support! ❤️

## License

[MIT License](https://opensource.org/licenses/MIT) © [Sebastian Landwehr](https://sebastianlandwehr.com)
[MIT License](https://opensource.org/license/mit/) © [Sebastian Landwehr](https://sebastianlandwehr.com)
<!-- /LICENSE -->
Loading

0 comments on commit e31ab1b

Please sign in to comment.