-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #551 from rtfpessoa/bump-dependencies
Bump dependencies
- Loading branch information
Showing
20 changed files
with
4,719 additions
and
4,308 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ jobs: | |
run: | | ||
export NEXT_VERSION="$(/bin/git-version --folder=$PWD --release-branch=master)" | ||
echo "Next version is ${NEXT_VERSION}" | ||
echo "${NEXT_VERSION}" > .version | ||
echo "${NEXT_VERSION}" > next-version.txt | ||
echo "version=${NEXT_VERSION}" >> $GITHUB_ENV | ||
- name: Get next npm tag name | ||
run: | | ||
|
@@ -37,22 +37,22 @@ jobs: | |
export PUBLISH_TAG="pr" | ||
fi | ||
echo "Next tag is ${PUBLISH_TAG}" | ||
echo "${PUBLISH_TAG}" > .tag | ||
echo "${PUBLISH_TAG}" > publish-tag.txt | ||
- name: Upload versions | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: versions | ||
if-no-files-found: error | ||
path: | | ||
.version | ||
.tag | ||
next-version.txt | ||
publish-tag.txt | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [version] | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x, 20.x] | ||
node-version: [16.x, 18.x, 20.x, 22.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
@@ -64,8 +64,8 @@ jobs: | |
cache: 'npm' | ||
- name: Log environment setup | ||
run: | | ||
node -v | ||
npm -v | ||
node -v | ||
npm -v | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Build templates | ||
|
@@ -86,60 +86,60 @@ jobs: | |
with: | ||
name: versions | ||
- name: Store version | ||
run: echo "version=$(cat .version)" >> $GITHUB_ENV | ||
run: echo "version=$(cat next-version.txt)" >> $GITHUB_ENV | ||
- name: Configure Git | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
git config user.email "[email protected]" | ||
git config user.name "GitHub Actions" | ||
- name: Tag commit | ||
uses: tvdias/[email protected] | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
tag: "${{ env.version }}" | ||
repo-token: '${{ secrets.GITHUB_TOKEN }}' | ||
tag: '${{ env.version }}' | ||
- name: Install dependencies | ||
run: npm install | ||
- uses: actions/setup-node@v3 | ||
with: | ||
registry-url: 'https://registry.npmjs.org' | ||
node-version: '18.x' | ||
node-version: '22.x' | ||
- name: Configure NPM version | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
rm -f .npmrc | ||
touch .npmrc | ||
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc | ||
echo "registry=https://registry.npmjs.org/" >> .npmrc | ||
echo "access=public" >> .npmrc | ||
echo "save-exact=true" >> .npmrc | ||
rm -f .npmrc | ||
touch .npmrc | ||
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc | ||
echo "registry=https://registry.npmjs.org/" >> .npmrc | ||
echo "access=public" >> .npmrc | ||
echo "save-exact=true" >> .npmrc | ||
- name: Version package | ||
run: | | ||
# Update version in packages to publish | ||
npm version $(cat .version) -m "Release version %s" | ||
# Update version in packages to publish | ||
npm version $(cat next-version.txt) -m "Release version %s" | ||
- name: Publish to NPM | ||
run: npm publish --tag $(cat .tag) | ||
run: npm publish --tag $(cat publish-tag.txt) | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
node-version: '22.x' | ||
registry-url: 'https://npm.pkg.github.com' | ||
- name: Configure NPM version | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
rm -f .npmrc | ||
touch .npmrc | ||
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc | ||
echo "@rtfpessoa:registry=https://npm.pkg.github.com/" >> .npmrc | ||
echo "access=public" >> .npmrc | ||
echo "save-exact=true" >> .npmrc | ||
rm -f .npmrc | ||
touch .npmrc | ||
echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc | ||
echo "@rtfpessoa:registry=https://npm.pkg.github.com/" >> .npmrc | ||
echo "access=public" >> .npmrc | ||
echo "save-exact=true" >> .npmrc | ||
- name: Publish to GPR | ||
run: | | ||
# HACK: Override npm package name to be able to publish in GitHub | ||
sed -i 's/^ "name":.*/ "name": "@rtfpessoa\/diff2html",/g' package.json | ||
echo "Going to publish version $(cat .version) to GitHub" | ||
npm publish --tag $(cat .tag) | ||
# HACK: Restore npm package name | ||
sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json | ||
# HACK: Override npm package name to be able to publish in GitHub | ||
sed -i 's/^ "name":.*/ "name": "@rtfpessoa\/diff2html",/g' package.json | ||
echo "Going to publish version $(cat next-version.txt) to GitHub" | ||
npm publish --tag $(cat publish-tag.txt) | ||
# HACK: Restore npm package name | ||
sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json | ||
- name: Upload docs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint:staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import globals from 'globals'; | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
import pluginJest from 'eslint-plugin-jest'; | ||
import json from '@eslint/json'; | ||
import pluginPromise from 'eslint-plugin-promise'; | ||
|
||
export default [ | ||
{ ...eslint.configs.recommended, files: ['src/**/*.{js,mjs,cjs,ts}'] }, | ||
...tseslint.configs.recommended, | ||
// ...tseslint.configs.recommendedTypeChecked, | ||
// ...tseslint.configs.strict, | ||
// ...tseslint.configs.stylistic, | ||
// ...tseslint.configs.strictTypeChecked, | ||
// ...tseslint.configs.stylisticTypeChecked, | ||
{ | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
args: 'all', | ||
argsIgnorePattern: '^_', | ||
caughtErrors: 'all', | ||
caughtErrorsIgnorePattern: '^_', | ||
destructuredArrayIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
pluginPromise.configs['flat/recommended'], | ||
{ | ||
plugins: { | ||
json, | ||
}, | ||
files: ['**/*.json'], | ||
language: 'json/json', | ||
rules: { | ||
'json/no-duplicate-keys': 'error', | ||
}, | ||
}, | ||
{ | ||
...pluginJest.configs['flat/recommended'], | ||
...pluginJest.configs['flat/style'], | ||
files: ['src/__tests__/**/*tests.ts'], | ||
plugins: { jest: pluginJest }, | ||
languageOptions: { | ||
globals: pluginJest.environments.globals.globals, | ||
}, | ||
}, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.es2025, | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly', | ||
document: 'readonly', | ||
navigator: 'readonly', | ||
window: 'readonly', | ||
}, | ||
parserOptions: { | ||
project: './tsconfig.eslint.json', | ||
tsconfigRootDir: './', | ||
}, | ||
}, | ||
}, | ||
{ | ||
ignores: ['src/diff2html-templates.*', 'coverage/', 'docs/', 'bundles-out/', 'bundles/', 'lib/', 'lib-esm/'], | ||
}, | ||
{ | ||
...tseslint.configs.disableTypeChecked, | ||
files: ['**/*.{js,mjs,cjs}'], | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,4 +19,5 @@ module.exports = { | |
lines: 93, | ||
}, | ||
}, | ||
prettierPath: require.resolve('prettier-2'), | ||
}; |
Oops, something went wrong.