-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed gulp - Migrated to jest - Fixed Github Actions - Removed Codacy coverage uploader - Bump major package version - Bump dependencies - Update logic to support breaking-dependency changes - Switched to SHA512 as the default key algorithm
- Loading branch information
Showing
19 changed files
with
4,060 additions
and
6,547 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
Empty file.
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 |
---|---|---|
|
@@ -10,7 +10,8 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
node-version: [20.x] | ||
npm-registry: ['https://registry.npmjs.org'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
|
@@ -23,20 +24,22 @@ jobs: | |
- name: 'NPM Test' | ||
shell: bash | ||
run: | | ||
npm version patch | ||
npx -c 'echo "$npm_package_version"' | ||
npm install -g gulp-cli gulp@5 | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm config set registry http://registry.npmjs.org | ||
npm config set always-auth true | ||
npm config set registry ${{ matrix.npm-registry }} | ||
sudo mkdir ~/.npm || true | ||
sudo chown -R $USER:$GROUP ~/.npm || true | ||
sudo chown -R $USER:$GROUP ~/.config || true | ||
npm ci | ||
gulp | ||
npm run coverage | ||
npm run build | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
|
||
- name: 'Report Coverage to Codacy' | ||
uses: codacy/[email protected] | ||
with: | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
coverage-reports: ./coverage/lcov.info | ||
|
||
- uses: ahmadnassri/action-dependabot-auto-merge@v2 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,8 +11,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
node-version: [20.x] | ||
slack-channel: ['build-monitoring'] | ||
npm-registry: ['https://registry.npmjs.org'] | ||
steps: | ||
- name: 'Notify build start' | ||
uses: voxmedia/github-action-slack-notify-build@v1 | ||
|
@@ -36,19 +37,24 @@ jobs: | |
- name: 'NPM Test' | ||
shell: bash | ||
run: | | ||
npm install -g gulp-cli gulp@4 | ||
npm install -g gulp-cli gulp@5 | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm config set registry http://registry.npmjs.org | ||
npm config set always-auth true | ||
npm config set registry ${{ matrix.npm-registry }} | ||
sudo mkdir ~/.npm || true | ||
sudo chown -R $USER:$GROUP ~/.npm || true | ||
sudo chown -R $USER:$GROUP ~/.config || true | ||
npm ci | ||
gulp | ||
npm run coverage | ||
npm run build | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
|
||
- name: 'Report Coverage to Codacy' | ||
uses: codacy/[email protected] | ||
with: | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
# or | ||
# api-token: ${{ secrets.CODACY_API_TOKEN }} | ||
coverage-reports: ./coverage/lcov.info | ||
|
||
- name: Notify slack success | ||
if: success() | ||
|
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 |
---|---|---|
|
@@ -11,8 +11,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
node-version: [20.x] | ||
slack-channel: ['build-monitoring'] | ||
npm-registry: ['https://registry.npmjs.org'] | ||
steps: | ||
- name: 'Notify build start' | ||
uses: voxmedia/github-action-slack-notify-build@v1 | ||
|
@@ -36,23 +37,25 @@ jobs: | |
- name: 'NPM Test' | ||
shell: bash | ||
run: | | ||
npm install -g gulp-cli gulp@4 | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
npm config set registry http://registry.npmjs.org | ||
npm config set always-auth true | ||
npm config set registry ${{ matrix.npm-registry }} | ||
sudo mkdir ~/.npm || true | ||
sudo chown -R $USER:$GROUP ~/.npm || true | ||
sudo chown -R $USER:$GROUP ~/.config || true | ||
npm ci | ||
gulp | ||
npm run build | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
|
||
- name: 'Report Coverage to Codacy' | ||
uses: codacy/[email protected] | ||
with: | ||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | ||
coverage-reports: ./coverage/lcov.info | ||
|
||
- name: 'NPM Publish' | ||
shell: bash | ||
run: | | ||
npm run coverage || true | ||
npm publish || true | ||
env: | ||
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
Empty file.
Empty file.
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
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,249 @@ | ||
import globals from "globals"; | ||
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"), { | ||
ignores: ["eslint.config.js", ".prettier.js"], | ||
languageOptions: { | ||
globals: { | ||
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])), | ||
...globals.node, | ||
...globals.mocha, | ||
}, | ||
|
||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"no-console": "warn", | ||
"no-control-regex": "warn", | ||
"block-scoped-var": "warn", | ||
complexity: ["warn", 15], | ||
"consistent-return": "warn", | ||
curly: ["error", "all"], | ||
"default-case": "error", | ||
"dot-location": ["error", "property"], | ||
"dot-notation": "error", | ||
eqeqeq: "error", | ||
"guard-for-in": "warn", | ||
"no-alert": "warn", | ||
"no-caller": "error", | ||
"no-div-regex": "warn", | ||
"no-else-return": "warn", | ||
|
||
"no-empty": ["error", { | ||
allowEmptyCatch: true, | ||
}], | ||
|
||
"no-empty-function": ["error", { | ||
allow: ["constructors", "arrowFunctions"], | ||
}], | ||
|
||
"no-eval": "warn", | ||
"no-extra-label": "error", | ||
"no-floating-decimal": "error", | ||
"no-implied-eval": "warn", | ||
"no-invalid-this": "error", | ||
"no-iterator": "error", | ||
"no-labels": "error", | ||
"no-lone-blocks": "error", | ||
"no-loop-func": "warn", | ||
"no-multi-spaces": "error", | ||
"no-multi-str": "error", | ||
"no-new-func": "warn", | ||
"no-octal-escape": "error", | ||
"no-proto": "error", | ||
"no-return-assign": "warn", | ||
"no-script-url": "warn", | ||
"no-self-compare": "error", | ||
"no-throw-literal": "error", | ||
"no-unmodified-loop-condition": "warn", | ||
"no-unused-expressions": "warn", | ||
"no-useless-call": "error", | ||
"no-void": "error", | ||
|
||
"no-warning-comments": ["warn", { | ||
terms: ["todo", "fixme", "note"], | ||
location: "start", | ||
}], | ||
|
||
"require-await": "warn", | ||
yoda: "error", | ||
"no-delete-var": "warn", | ||
"no-shadow": "warn", | ||
"no-shadow-restricted-names": "error", | ||
"no-undef-init": "error", | ||
"no-use-before-define": "error", | ||
"no-buffer-constructor": "error", | ||
"no-new-require": "error", | ||
"no-path-concat": "error", | ||
|
||
"array-bracket-newline": ["error", { | ||
multiline: true, | ||
}], | ||
|
||
"array-bracket-spacing": ["warn", "never"], | ||
"block-spacing": ["error", "always"], | ||
|
||
"brace-style": ["error", "1tbs", { | ||
allowSingleLine: true, | ||
}], | ||
|
||
camelcase: ["error", { | ||
properties: "always", | ||
}], | ||
|
||
"comma-spacing": ["error", { | ||
before: false, | ||
after: true, | ||
}], | ||
|
||
"comma-style": ["error", "last"], | ||
"computed-property-spacing": ["error", "never"], | ||
"consistent-this": ["error", "self"], | ||
"eol-last": ["error", "always"], | ||
"func-call-spacing": ["error", "never"], | ||
"function-paren-newline": ["error", "multiline"], | ||
|
||
"id-length": ["error", { | ||
min: 2, | ||
}], | ||
|
||
indent: ["error", 2, { | ||
SwitchCase: 1, | ||
}], | ||
|
||
"jsx-quotes": ["error", "prefer-double"], | ||
|
||
"key-spacing": ["error", { | ||
afterColon: true, | ||
beforeColon: false, | ||
mode: "minimum", | ||
}], | ||
|
||
"keyword-spacing": ["error", { | ||
before: true, | ||
after: true, | ||
}], | ||
|
||
"linebreak-style": ["error", "unix"], | ||
|
||
"lines-around-comment": ["error", { | ||
beforeBlockComment: true, | ||
}], | ||
|
||
"lines-between-class-members": ["error", "always"], | ||
|
||
"max-len": ["warn", { | ||
code: 120, | ||
}], | ||
|
||
"new-cap": "error", | ||
"new-parens": "error", | ||
"newline-per-chained-call": "error", | ||
"no-array-constructor": "error", | ||
"no-lonely-if": "error", | ||
"no-multi-assign": "error", | ||
|
||
"no-multiple-empty-lines": ["error", { | ||
max: 2, | ||
maxEOF: 1, | ||
maxBOF: 1, | ||
}], | ||
|
||
"no-new-object": "error", | ||
"no-tabs": "error", | ||
"no-unneeded-ternary": "error", | ||
"no-whitespace-before-property": "error", | ||
|
||
"object-curly-newline": ["error", { | ||
multiline: true, | ||
}], | ||
|
||
"object-curly-spacing": ["error", "always"], | ||
"operator-assignment": "warn", | ||
|
||
"operator-linebreak": ["error", "after", { | ||
overrides: { | ||
"?": "none", | ||
":": "none", | ||
}, | ||
}], | ||
|
||
"quote-props": ["error", "as-needed"], | ||
quotes: ["error", "single"], | ||
semi: "error", | ||
|
||
"semi-spacing": ["error", { | ||
before: false, | ||
after: true, | ||
}], | ||
|
||
"semi-style": ["error", "last"], | ||
"space-before-blocks": "error", | ||
"space-before-function-paren": ["error", "never"], | ||
"space-in-parens": "error", | ||
"space-infix-ops": "error", | ||
|
||
"space-unary-ops": ["error", { | ||
words: true, | ||
nonwords: false, | ||
}], | ||
|
||
"spaced-comment": ["warn", "always"], | ||
|
||
"switch-colon-spacing": ["error", { | ||
after: true, | ||
before: false, | ||
}], | ||
|
||
"template-tag-spacing": "error", | ||
"arrow-body-style": ["error", "always"], | ||
"arrow-parens": "error", | ||
|
||
"arrow-spacing": ["error", { | ||
before: true, | ||
after: true, | ||
}], | ||
|
||
"generator-star-spacing": ["error", { | ||
before: true, | ||
after: false, | ||
}], | ||
|
||
"no-confusing-arrow": "error", | ||
"no-var": "warn", | ||
"object-shorthand": ["error", "consistent"], | ||
"prefer-arrow-callback": "error", | ||
"prefer-const": "warn", | ||
"prefer-numeric-literals": "warn", | ||
"prefer-rest-params": "warn", | ||
"prefer-spread": "warn", | ||
"prefer-template": "warn", | ||
"rest-spread-spacing": "error", | ||
"symbol-description": "error", | ||
"template-curly-spacing": "error", | ||
|
||
"yield-star-spacing": ["error", { | ||
before: true, | ||
after: false, | ||
}], | ||
}, | ||
}]; |
Oops, something went wrong.