Skip to content

Commit

Permalink
Update dependencies (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja authored Nov 15, 2024
1 parent 765e0a4 commit 489af87
Show file tree
Hide file tree
Showing 10 changed files with 2,569 additions and 8,940 deletions.
17 changes: 0 additions & 17 deletions .eslintrc.json

This file was deleted.

20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use NodeJS v20
- name: Use NodeJS v22
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
- name: Install
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Lint
Expand All @@ -60,18 +60,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use NodeJS v20
- name: Use NodeJS v22
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
run: |
npm ci --ignore-scripts --no-audit --no-fund
npx puppeteer browsers install chrome
- name: Build
run: npm run build
- name: Test
run: |
npx puppeteer browsers install chrome
npm test
run: npm test
- name: Deploy to NPM
uses: JS-DevTools/npm-publish@v3
with:
Expand All @@ -87,15 +87,15 @@ jobs:
id: tag
run: |
TAG_TITLE=${GITHUB_REF#refs/*/}
echo ::set-output name=title::$TAG_TITLE
echo "title=$TAG_TITLE" >> $GITHUB_OUTPUT
git -c protocol.version=2 fetch --prune --progress \
--no-recurse-submodules origin \
+refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
TAG_BODY="$(git tag -l --format='%(contents)' $TAG_TITLE)"
TAG_BODY="${TAG_BODY//'%'/'%25'}"
TAG_BODY="${TAG_BODY//$'\n'/'%0A'}"
TAG_BODY="${TAG_BODY//$'\r'/'%0D'}"
echo ::set-output name=body::$TAG_BODY
echo "body=$TAG_BODY" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ emsdk
*.wasm
*.tgz
/*.mjs
!/eslint.config.mjs
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname $0)/_/husky.sh"

set -e

npm run build
Expand Down
3 changes: 1 addition & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.svgPathBbox = void 0;
exports.svgPathBbox = svgPathBbox;
// WARNING: This file is autogenerated, edit lib/index.template.ts
var SvgPath = require("svgpath");
// Precision for consider cubic polynom as quadratic one
Expand Down Expand Up @@ -164,4 +164,3 @@ function svgPathBbox(d) {
}, true);
return [min[0], min[1], max[0], max[1]];
}
exports.svgPathBbox = svgPathBbox;
46 changes: 46 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {},
parser: tsParser,
ecmaVersion: 2020,
sourceType: "module",

parserOptions: {
requireConfigFile: false,
},
},

rules: {
"no-console": [
"error",
{
allow: ["time", "timeEnd"],
},
],
},
},
];
Loading

0 comments on commit 489af87

Please sign in to comment.