Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
940 changes: 0 additions & 940 deletions .yarn/releases/yarn-4.14.1.cjs

This file was deleted.

944 changes: 944 additions & 0 deletions .yarn/releases/yarn-4.16.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ packageExtensions:
peerDependencies:
mongoose: "*"

yarnPath: .yarn/releases/yarn-4.14.1.cjs
yarnPath: .yarn/releases/yarn-4.16.0.cjs
39 changes: 29 additions & 10 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import pluginCypress from 'eslint-plugin-cypress/flat'
import tseslint from 'typescript-eslint'

import js from '@eslint/js'
import pluginReact from '@eslint-react/eslint-plugin'
import pluginImport from 'eslint-plugin-import'
import pluginJSXA11y from 'eslint-plugin-jsx-a11y'
import pluginReact from 'eslint-plugin-react'
import pluginReactHooks from 'eslint-plugin-react-hooks'
import pluginTSDoc from 'eslint-plugin-tsdoc'
import pluginUnicorn from 'eslint-plugin-unicorn'
Expand All @@ -30,16 +30,11 @@ export default [
pluginImport.flatConfigs.typescript,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
pluginReact.configs.flat.recommended,
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
pluginJSXA11y.flatConfigs.recommended,
pluginCypress.configs.recommended,
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
parserOptions: { projectService: true },
},
settings: { react: { version: 'detect' } },
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
plugins: { tsdoc: pluginTSDoc, import: pluginImport },
rules: {
Expand Down Expand Up @@ -109,14 +104,38 @@ export default [
},
},
{
name: 'eslint-plugin-react-hooks/recommended',
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
...pluginReactHooks.configs.flat.recommended,
files: [
'packages/jbrowse-plugin-apollo/src/**/*.{jsx,tsx}',
'packages/website/src/**/*.{jsx,tsx}',
],
plugins: { 'react-hooks': pluginReactHooks },
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
rules: { ...pluginReactHooks.configs.recommended.rules },
},
{
...pluginReact.configs['disable-conflict-eslint-plugin-react-hooks'],
files: [
'packages/jbrowse-plugin-apollo/src/**/*.{jsx,tsx}',
'packages/website/src/**/*.{jsx,tsx}',
],
},
{
...pluginReact.configs['recommended-typescript'],
files: [
'packages/jbrowse-plugin-apollo/src/**/*.{jsx,tsx}',
'packages/website/src/**/*.{jsx,tsx}',
],
},
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
...pluginJSXA11y.flatConfigs.recommended,
files: [
'packages/jbrowse-plugin-apollo/src/**/*.{jsx,tsx}',
'packages/website/src/**/*.{jsx,tsx}',
],
},
{
...pluginCypress.configs.recommended,
files: ['packages/jbrowse-plugin-apollo/cypress/**/*'],
},
// Don't enforce tsdoc syntax in JS files
{
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"postinstall": "husky"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
"@eslint-react/eslint-plugin": "^5.8.17",
"@eslint/js": "^10.0.1",
"@types/cross-spawn": "^6.0.6",
"@types/node": "^24.10.9",
"@types/semver": "^7",
Expand All @@ -27,14 +28,13 @@
"@yarnpkg/types": "^4.0.0",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"eslint": "9.21.0",
"eslint": "10.4.1",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-cypress": "^5.2.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^7.0.0",
"eslint-plugin-tsdoc": "^0.4.0",
"eslint-plugin-tsdoc": "^0.5.2",
"eslint-plugin-unicorn": "^57.0.0",
"globals": "^15.12.0",
"husky": "^9.0.11",
Expand All @@ -47,8 +47,8 @@
"tslib": "^2.3.1",
"tsx": "^4.6.2",
"typescript": "^5.5.3",
"typescript-eslint": "^8.25.0",
"typescript-eslint": "^8.61.0",
"yargs": "^17.7.2"
},
"packageManager": "yarn@4.14.1"
"packageManager": "yarn@4.16.0"
}
4 changes: 1 addition & 3 deletions packages/apollo-cli/src/baseCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export abstract class BaseCommand<T extends typeof Command> extends Command {
}

private getConfig(configFile: string | undefined): ApolloConf {
if (configFile === undefined) {
configFile = path.join(this.config.configDir, 'config.yml')
}
configFile ??= path.join(this.config.configDir, 'config.yml')
checkConfigfileExists(configFile)
const config: ApolloConf = new ApolloConf(configFile)
return config
Expand Down
3 changes: 1 addition & 2 deletions packages/apollo-cli/src/commands/assembly/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ these checks use `apollo feature check`.'
return
}

let inputCheckIds: string[] = []
inputCheckIds = await convertCheckNameToId(
const inputCheckIds = await convertCheckNameToId(
access.address,
access.accessToken,
flags.check,
Expand Down
3 changes: 1 addition & 2 deletions packages/apollo-cli/src/commands/assembly/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ export default class ApolloCmd extends BaseCommand<typeof ApolloCmd> {
;[assembly] = await idReader([flags.assembly])
}

let refseqIds: string[] = []
refseqIds = await getRefseqId(
const refseqIds = await getRefseqId(
access.address,
access.accessToken,
flags.refseq,
Expand Down
12 changes: 3 additions & 9 deletions packages/apollo-cli/src/commands/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ export default class ApolloConfig extends BaseCommand<typeof ApolloConfig> {
if (args.key === undefined) {
await this.interactiveSetup(config, flags.profile)
} else {
let profileName = flags.profile
if (profileName === undefined) {
profileName = process.env.APOLLO_PROFILE ?? 'default'
}
let profileName = flags.profile ?? process.env.APOLLO_PROFILE ?? 'default'
if (flags.profile !== undefined) {
profileName = flags.profile
}
Expand All @@ -99,9 +96,7 @@ export default class ApolloConfig extends BaseCommand<typeof ApolloConfig> {
config: ApolloConf,
profileName: string | undefined,
) {
if (profileName === undefined) {
profileName = await this.askProfileName(config.getProfileNames())
}
profileName ??= await this.askProfileName(config.getProfileNames())

let setMe = true
while (setMe) {
Expand All @@ -114,8 +109,7 @@ export default class ApolloConfig extends BaseCommand<typeof ApolloConfig> {
const address: string = config.get(
`${profileName}.${KEYS[KEYS.address]}`,
) as string
let accessType = ''
accessType = await this.selectAccessType(address)
const accessType = await this.selectAccessType(address)

config.setAccessType(profileName, accessType)
if (accessType === 'root') {
Expand Down
3 changes: 1 addition & 2 deletions packages/apollo-cli/src/commands/feature/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ the database or by name and assembly or by identifier.'
}
const feature: AnnotationFeatureSnapshot =
(await res.json()) as AnnotationFeatureSnapshot
let refseqIds: string[] = []
refseqIds = await getRefseqId(
const refseqIds = await getRefseqId(
access.address,
access.accessToken,
flags.refseq,
Expand Down
4 changes: 1 addition & 3 deletions packages/apollo-cli/src/commands/feature/edit-attribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ terms to non-existing terms'
const featureJson = JSON.parse(
await response.text(),
) as AnnotationFeatureSnapshot
if (featureJson.attributes === undefined) {
featureJson.attributes = {}
}
featureJson.attributes ??= {}

const oldAttributes: Record<string, string[]> = {}
for (const [key, val] of Object.entries(featureJson.attributes)) {
Expand Down
5 changes: 1 addition & 4 deletions packages/apollo-cli/src/commands/file/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ export default class Download extends BaseCommand<typeof Download> {
access.accessToken,
`files/${fileId}`,
)
let { output } = flags
if (output === undefined) {
output = fileRec['basename' as keyof typeof fileRec] as string
}
const { output = fileRec['basename' as keyof typeof fileRec] } = flags
const fileWriteStream = createWriteStream(output)
await res.body?.pipeTo(
Writable.toWeb(output === '-' ? process.stdout : fileWriteStream),
Expand Down
11 changes: 3 additions & 8 deletions packages/apollo-cli/src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,10 @@ need to execute this command again unless the token has expired. To setup a new
public async run(): Promise<void> {
const { flags } = await this.parse(Login)

let configFile = flags['config-file']
if (configFile === undefined) {
configFile = path.join(this.config.configDir, 'config.yml')
}
const configFile =
flags['config-file'] ?? path.join(this.config.configDir, 'config.yml')

let profileName = flags.profile
if (profileName === undefined) {
profileName = process.env.APOLLO_PROFILE ?? 'default'
}
const profileName = flags.profile ?? process.env.APOLLO_PROFILE ?? 'default'
basicCheckConfig(configFile, profileName)
const config: ApolloConf = new ApolloConf(configFile)
const accessType: string = config.get(`${profileName}.accessType`) as string
Expand Down
11 changes: 3 additions & 8 deletions packages/apollo-cli/src/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,10 @@ export default class Logout extends BaseCommand<typeof Logout> {
public async run(): Promise<void> {
const { flags } = await this.parse(Logout)

let profileName = flags.profile
if (profileName === undefined) {
profileName = process.env.APOLLO_PROFILE ?? 'default'
}
const profileName = flags.profile ?? process.env.APOLLO_PROFILE ?? 'default'

let configFile = flags['config-file']
if (configFile === undefined) {
configFile = path.join(this.config.configDir, 'config.yml')
}
const configFile =
flags['config-file'] ?? path.join(this.config.configDir, 'config.yml')
basicCheckConfig(configFile, profileName)
const config: ApolloConf = new ApolloConf(configFile)
config.delete(`${profileName}.${KEYS.accessToken}`)
Expand Down
11 changes: 3 additions & 8 deletions packages/apollo-cli/src/commands/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ Note that this command does not check the validity of the access token.'
public async run(): Promise<void> {
const { flags } = await this.parse(Status)

let profileName = flags.profile
if (profileName === undefined) {
profileName = process.env.APOLLO_PROFILE ?? 'default'
}
const profileName = flags.profile ?? process.env.APOLLO_PROFILE ?? 'default'

let configFile = flags['config-file']
if (configFile === undefined) {
configFile = path.join(this.config.configDir, 'config.yml')
}
const configFile =
flags['config-file'] ?? path.join(this.config.configDir, 'config.yml')
basicCheckConfig(configFile, profileName)

const config: ApolloConf = new ApolloConf(configFile)
Expand Down
Loading
Loading