8000 deps: bump @electron/get from 3.1.0 to 4.0.0 by dependabot[bot] · Pull Request #1737 · ipfs/aegir · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

deps: bump @electron/get from 3.1.0 to 4.0.0 #1737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations 8000
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dictionaries/ipfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ runtimes
sdp
secio
secp
serviceworker
semver
seqno
sha
Expand Down
186 changes: 43 additions & 143 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,83 +1,53 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
// @ts-expect-error no types
import typescriptParser from '@typescript-eslint/parser'
import love from 'eslint-config-love'
// @ts-expect-error no types
import importPlugin from 'eslint-plugin-import'
import jsdoc from 'eslint-plugin-jsdoc'
// @ts-expect-error no types
import noOnlyTests from 'eslint-plugin-no-only-tests'
import neostandard from 'neostandard'

const standard = neostandard({
env: ['node', 'browser', 'worker', 'serviceworker', 'webextensions', 'mocha', 'es2024'],
})

const MAX_NESTED_CALLBACKS = 4
const MAX_DEPTH = 4
const TAG_START_LINES = 1
/**
* @param {string} name
* @returns {import('eslint').Linter.Config}
*/
function findRuleset (name) {
const ruleset = standard.find(r => r.name === name)

/** @type {import('eslint').Linter.RulesRecord} */
const jsRules = {
strict: ['error', 'safe'],
curly: 'error',
'block-scoped-var': 'error',
complexity: 'warn',
'default-case': 'error',
'guard-for-in': 'warn',
'linebreak-style': ['warn', 'unix'],
'no-alert': 'error',
'no-console': 'error',
'no-div-regex': 'error',
'no-empty': 'warn',
'no-extra-semi': 'error',
'no-implicit-coercion': 'error',
'no-loop-func': 'error',
'no-nested-ternary': 'warn',
'no-script-url': 'error',
'no-warning-comments': 'warn',
'max-nested-callbacks': ['error', MAX_NESTED_CALLBACKS],
'max-depth': ['error', MAX_DEPTH],
'require-yield': 'error',
'eslint-comments/require-description': 'off',
'arrow-body-style': 'off',
if (ruleset == null) {
throw new Error(`Could not find ruleset "${name}`)
}

Check warning on line 20 in eslint.config.js

View check run for this annotation

Codecov / codecov/patch

eslint.config.js#L19-L20

Added lines #L19 - L20 were not covered by tests

return ruleset
}

// plugins
'no-only-tests/no-only-tests': 'error',
/**
*
* @param {import('eslint').Linter.StringSeverity} severity
* @param {any[]} config
*
* @returns {import('eslint').Linter.RuleSeverity | import('eslint').Linter.RuleSeverityAndOptions<any>}
*/
function rule (severity, ...config) {
if (config == null || config.length === 0) {
return severity
}

'jsdoc/check-alignment': 'error',
'jsdoc/check-examples': 'off',
'jsdoc/check-indentation': 'error',
'jsdoc/check-param-names': 'error',
'jsdoc/check-syntax': 'error',
'jsdoc/check-tag-names': ['error', { definedTags: ['internal', 'packageDocumentation'] }],
'jsdoc/check-types': 'error',
'jsdoc/implements-on-classes': 'error',
'jsdoc/match-description': 'off',
'jsdoc/tag-lines': ['error', 'any', { startLines: TAG_START_LINES }],
'jsdoc/no-types': 'off',
// Note: no-undefined-types rule causes to many false positives:
// https://github.com/gajus/eslint-plugin-jsdoc/issues/559
// And it is also unaware of many built in types
// https://github.com/gajus/eslint-plugin-jsdoc/issues/280
'jsdoc/no-undefined-types': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/require-description': 'off',
'jsdoc/require-description-complete-sentence': 'off',
'jsdoc/require-example': 'off',
'jsdoc/require-hyphen-before-param-description': 'error',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param': 'error',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-name': 'error',
'jsdoc/require-param-type': 'error',
// Note: Do not require @returns because TS often can infer return types and
// in many such cases it's not worth it.
'jsdoc/require-returns': 'off',
'jsdoc/require-returns-check': 'error',
'jsdoc/require-returns-description': 'off',
// Note: At the moment type parser used by eslint-plugin-jsdoc does not
// parse various forms correctly. For now warn on invalid type from,
// should revisit once following issue is fixed:
// https://github.com/jsdoctypeparser/jsdoctypeparser/issues/50
'jsdoc/valid-types': 'off',
return [severity, ...config]
}

'import/order': [
const base = findRuleset('neostandard/base')
base.plugins = {
...base.plugins,
'no-only-tests': noOnlyTests,
import: importPlugin,
}
base.rules = {
...base.rules,
'no-console': rule('error'),
'no-only-tests/no-only-tests': rule('error'),
'import/order': rule(
'error',
{
alphabetize: {
Expand All @@ -88,77 +58,7 @@
// the overall order of imports - anything not in this list is grouped together at the end
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type']
}
]
}

/** @type {import('eslint').Linter.RulesRecord} */
const tsRules = {
...love.rules,
...jsRules,

'no-use-before-define': 'off', // Types often are recursive & no use before define is too restrictive
'no-return-await': 'off', // disable this rule to use @typescript-eslint/return-await instead
'no-unused-vars': 'off', // disable this rule to use @typescript-eslint/no-unused-vars instead
'no-undef': 'off', // typescript already checks for undefined variables so this is redundant - https://typescript-eslint.io/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors

// 'etc/prefer-interface': 'error', // https://ncjamieson.com/prefer-interfaces/
'@typescript-eslint/prefer-function-type': 'off', // conflicts with 'etc/prefer-interface'
'@typescript-eslint/explicit-function-return-type': 'error', // functions require return types
'@typescript-eslint/no-this-alias': 'off', // allow 'const self = this'
'@typescript-eslint/await-thenable': 'error', // disallows awaiting a value that is not a "Thenable"
'@typescript-eslint/restrict-template-expressions': 'off', // allow values with `any` type in template literals
'@typescript-eslint/method-signature-style': ['error', 'method'], // enforce method signature style
'@typescript-eslint/no-unsafe-argument': 'off', // allow passing args with `any` type to functions
'@typescript-eslint/unbound-method': 'off', // allow invoking functions that may be unbound (e.g. passed as part of an options object)
'@typescript-eslint/no-unused-vars': 'error', // disallow unused variables
'@typescript-eslint/return-await': ['error', 'in-try-catch'], // require awaiting thenables returned from try/catch
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'jsdoc/require-param': 'off', // do not require jsdoc for params
'jsdoc/require-param-type': 'off' // allow compiler to derive param type
}

/**
* @type {import('eslint').Linter.Config['plugins']}
*/
const plugins = {
...love.plugins,
jsdoc,
'no-only-tests': noOnlyTests,
'import': importPlugin,
'@typescript-eslint': typescriptEslint
)
}

/**
* @typedef {import('eslint').Linter.Config} EslintConfig
*/

/** @type {EslintConfig[]} */
const config = [{
...love,
languageOptions: {
sourceType: 'module',
parserOptions: {
project: true
}
},
files: ['**/*.js', '**/*.jsx'],
plugins,
rules: jsRules
}, {
...love,
languageOptions: {
sourceType: 'module',
parser: typescriptParser,
parserOptions: {
project: './tsconfig.json', // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/README.md#parseroptionsproject
projectService: true,
tsconfigRootDir: import.meta.dirname,
}
},
files: ['**/*.ts', '**/*.tsx'],
plugins,
rules: tsRules
}]

export default config
export default standard
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
},
"keywords": [
"build",
"lint",
"standard"
"lint"
],
"bin": {
"aegir": "src/index.js"
Expand Down Expand Up @@ -66,6 +65,7 @@
},
"files": [
"cspell.json",
"eslint.config.js",
"src",
"dictionaries",
"dist",
Expand Down Expand Up @@ -219,7 +219,7 @@
"release": "node src/index.js release --no-bundle"
},
"dependencies": {
"@electron/get": "^3.0.0",
"@electron/get": "^4.0.0",
"@polka/send-type": "^0.5.2",
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^13.0.0",
Expand All @@ -234,7 +234,6 @@
"@types/mocha": "^10.0.0",
"@types/node": "^22.10.7",
"@typescript-eslint/eslint-plugin": "^8.32.1",
"@typescript-eslint/parser": "^8.32.1",
"buffer": "^6.0.3",
"bytes": "^3.1.0",
"c8": "^10.1.2",
Expand All @@ -253,10 +252,8 @@
"env-paths": "^3.0.0",
"esbuild": "^0.25.0",
"eslint": "^9.27.0",
"eslint-config-love": "^120.0.0",
"eslint-formatter-unix": "^8.40.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsdoc": "^50.6.17",
"eslint-plugin-no-only-tests": "^3.3.0",
"execa": "^8.0.1",
"extract-zip": "^2.0.1",
Expand All @@ -282,6 +279,7 @@
"micromark-extension-gfm-table": "^2.0.0",
"micromark-extension-gfm-task-list-item": "^2.0.1",
"mocha": "^11.0.1",
"neostandard": "^0.12.1",
"npm-package-json-lint": "^8.0.0",
"nyc": "^17.0.0",
"p-map": "^7.0.1",
Expand Down
4 changes: 2 additions & 2 deletions src/check-project/check-build-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
await ensureFileHasContents(projectDir, '.github/workflows/stale.yml')

let defaultCiContent = await download(ciFileUrl)
defaultCiContent = defaultCiContent.replaceAll('${{{ github.default_branch }}}', branchName)
defaultCiContent = defaultCiContent.replaceAll('${{{ .config.versions.uci // (.source.tag | sub("\\\\.[^.\\\\-\\\\+]+(?=\\\\-|\\\\+|$)"; "")) }}}', 'v0.0')
defaultCiContent = defaultCiContent.replaceAll('${{{ github.default_branch }}}', branchName) // eslint-disable-line no-template-curly-in-string
defaultCiContent = defaultCiContent.replaceAll('${{{ .config.versions.uci // (.source.tag | sub("\\\\.[^.\\\\-\\\\+]+(?=\\\\-|\\\\+|$)"; "")) }}}', 'v0.0') // eslint-disable-line no-template-curly-in-string

Check warning on line 48 in src/check-project/check-build-files.js

View check run for this annotation

Codecov / codecov/patch

src/check-project/check-build-files.js#L47-L48

Added lines #L47 - L48 were not covered by tests

await ensureFileHasContents(projectDir, '.github/workflows/js-test-and-release.yml', defaultCiContent)
}
3 changes: 0 additions & 3 deletions src/check-project/manifests/typed-cjs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import mergeOptions from '../../utils/merge-options.js'
import { semanticReleaseConfig } from '../semantic-release-config.js'
import {
sortFields,
constructManifest
} from '../utils.js'

const merge = mergeOptions.bind({ ignoreUndefined: true })

/**
* @param {import('../index.js').ProcessManifestContext} context
*/
Expand Down
3 changes: 0 additions & 3 deletions src/check-project/manifests/untyped-cjs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import mergeOptions from '../../utils/merge-options.js'
import { semanticReleaseConfig } from '../semantic-release-config.js'
import {
sortFields,
constructManifest
} from '../utils.js'

const merge = mergeOptions.bind({ ignoreUndefined: true })

/**
* @param {import('../index.js').ProcessManifestContext} context
*/
Expand Down
3 changes: 0 additions & 3 deletions src/check-project/manifests/untyped-esm.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import mergeOptions from '../../utils/merge-options.js'
import { semanticReleaseConfig } from '../semantic-release-config.js'
import {
sortFields,
constructManifest
} from '../utils.js'

const merge = mergeOptions.bind({ ignoreUndefined: true })

/**
* @param {import('../index.js').ProcessManifestContext} context
*/
Expand Down
4 changes: 2 additions & 2 deletions src/config/tsconfig.aegir.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"allowJs": true,
"checkJs": true,
"target": "ES2024",
"module": "ES2022",
"module": "Node16",
"lib": ["DOM", "DOM.Iterable", "WebWorker", "ES2024"],
"noEmit": false,
"noEmitOnError": true,
Expand All @@ -20,7 +20,7 @@
"sourceMap": true,
// module resolution
"esModuleInterop": true,
"moduleResolution": "node",
"moduleResolution": "Node16",
// advanced
"verbatimModuleSyntax": true,
"forceConsistentCasingInFileNames": true,
Expand Down
1 change: 0 additions & 1 deletion src/docs/readme-updater-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export function load (app) {
}
}

// @ts-expect-error https://github.com/TypeStrong/typedo 2851 c/issues/2903#issuecomment-2733243351
app.renderer.on(td.RendererEvent.END, onRendererEnd)
}

Expand Down
3 changes: 1 addition & 2 deletions src/docs/type-indexer-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export function load (app) {
}
}

// @ts-expect-error https://github.com/TypeStrong/typedoc/issues/2903#issuecomment-2733243351
app.converter.on(td.Converter.EVENT_RESOLVE, onResolve)

app.serializer.addSerializer({
Expand All @@ -181,6 +180,7 @@ export function load (app) {
},
fromObject (_model, obj) {
app.deserializer.defer((project) => {
// @ts-expect-error not properties of these types
project.reflectionSources = project.reflectionSources ?? {}

// @ts-expect-error obj is unknown type
Expand All @@ -192,7 +192,6 @@ export function load (app) {
}
})

// @ts-expect-error https://github.com/TypeStrong/typedoc/issues/2903#issuecomment-2733243351
app.renderer.on(td.RendererEvent.BEGIN, onRendererBegin)
}

Expand Down
2 changes: 0 additions & 2 deletions src/document-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ const tasks = new Listr(
userTSConfig,
{
compilerOptions: {
target: 'esnext',
module: 'esnext',
noImplicitAny: true,
noEmit: true,
skipLibCheck: true
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/dependency-check/esm-fail/src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @ts-nocheck
/* eslint-disable */
import { execa } from 'execa'
1 change: 1 addition & 0 deletions test/fixtures/dependency-check/esm-pass/src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @ts-nocheck
/* eslint-disable */
import { execa } from 'execa'
1 change: 1 addition & 0 deletions test/fixtures/dependency-check/fail-prod/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @ts-nocheck
/* eslint-disable */
import { execa } from 'execa'
2 changes: 2 additions & 0 deletions test/fixtures/dependency-check/fail-unused/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// @ts-nocheck
/* eslint-disable */
import { execa } from 'execa'
1 change: 1 addition & 0 deletions test/fixtures/dependency-check/fail/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @ts-nocheck
/* eslint-disable */
import { execa } from 'execa'
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
// @ts-nocheck
/* eslint-disable */
import { execa } from 'execa'
Loading
0