-
Notifications
You must be signed in to change notification settings - Fork 5
chore: update @oclif/core to v4 and @adobe/eslint-config-aio-lib-config to v5 #130
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,3 +17,4 @@ package-lock.json | |
| playground/ | ||
| oclif.manifest.json | ||
| .idea | ||
| .claude | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| /* | ||
| Copyright 2020 Adobe. All rights reserved. | ||
| This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. You may obtain a copy | ||
| of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
| Unless required by applicable law or agreed to in writing, software distributed under | ||
| the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
| OF ANY KIND, either express or implied. See the License for the specific language | ||
| governing permissions and limitations under the License. | ||
| */ | ||
|
|
||
| const aioLibConfig = require('@adobe/eslint-config-aio-lib-config') | ||
| const pluginJest = require('eslint-plugin-jest') | ||
|
|
||
| module.exports = [ | ||
| ...aioLibConfig, | ||
| { | ||
| settings: { | ||
| jsdoc: { | ||
| ignorePrivate: true | ||
| } | ||
| }, | ||
| rules: { | ||
| 'jsdoc/tag-lines': [ | ||
| 'error', | ||
| 'never', | ||
| { | ||
| startLines: null | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| files: ['test/**/*.js'], | ||
| ...pluginJest.configs['flat/recommended'], | ||
| rules: { | ||
| ...pluginJest.configs['flat/recommended'].rules | ||
| } | ||
| }, | ||
| { | ||
| files: ['e2e/**/*.js'], | ||
| ...pluginJest.configs['flat/recommended'], | ||
| rules: { | ||
| ...pluginJest.configs['flat/recommended'].rules, | ||
| 'n/no-unpublished-require': 'off' | ||
| } | ||
| } | ||
| ] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ governing permissions and limitations under the License. | |
| */ | ||
|
|
||
| const BaseCommand = require('../../../BaseCommand.js') | ||
| const { Args, Flags, ux: cli } = require('@oclif/core') | ||
| const { Args, Flags, ux } = require('@oclif/core') | ||
| const { sentenceValidatorWithMinOneChar, eventCodeValidator } = require('../../../utils/validator') | ||
| const inquirer = require('inquirer') | ||
| const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-events:eventmetadata:create', { provider: 'debug' }) | ||
|
|
@@ -41,9 +41,9 @@ class EventmetadataCreateCommand extends BaseCommand { | |
| description: response.description | ||
| } | ||
|
|
||
| cli.action.start('Creating Event Metadata') | ||
| ux.action.start('Creating Event Metadata') | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought action was removed and we're all just supposed to use ora
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, action is still there: https://github.com/oclif/core/tree/main/src/ux |
||
| const eventmetadata = await this.eventClient.createEventMetadataForProvider(this.conf.org.id, this.conf.project.id, this.conf.workspace.id, args.providerId, eventMetadataPayload) | ||
| cli.action.stop() | ||
| ux.action.stop() | ||
|
|
||
| if (flags.json) { | ||
| this.printJson(eventmetadata) | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,17 +11,18 @@ governing permissions and limitations under the License. | |||||
| */ | ||||||
|
|
||||||
| const BaseCommand = require('../../../BaseCommand.js') | ||||||
| const { Args, Flags, ux: cli } = require('@oclif/core') | ||||||
| const { Args, Flags, ux } = require('@oclif/core') | ||||||
| const { table } = require('../../../utils/table') | ||||||
| const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-events:eventmetadata:list', { provider: 'debug' }) | ||||||
|
|
||||||
| class EventmetadataListCommand extends BaseCommand { | ||||||
| async run () { | ||||||
| const { args, flags } = await this.parse(EventmetadataListCommand) | ||||||
| try { | ||||||
| await this.initSdk() | ||||||
| cli.action.start('Fetching all Event Metadata for provider') | ||||||
| ux.action.start('Fetching all Event Metadata for provider') | ||||||
| const eventmetadatas = await this.eventClient.getAllEventMetadataForProvider(args.providerId) | ||||||
| cli.action.stop() | ||||||
| ux.action.stop() | ||||||
| if (flags.json) { | ||||||
| this.printJson(eventmetadatas) | ||||||
| } else if (flags.yml) { | ||||||
|
|
@@ -48,7 +49,7 @@ class EventmetadataListCommand extends BaseCommand { | |||||
| header: 'DESC' | ||||||
| } | ||||||
| } | ||||||
| cli.table(projects, columns) | ||||||
| table(projects, columns) | ||||||
|
||||||
| table(projects, columns) | |
| table(projects, columns, { printLine: this.log.bind(this) }) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -11,15 +11,16 @@ governing permissions and limitations under the License. | |||||
| */ | ||||||
|
|
||||||
| const BaseCommand = require('../../../BaseCommand.js') | ||||||
| const { Flags, ux: cli } = require('@oclif/core') | ||||||
| const { Flags, ux } = require('@oclif/core') | ||||||
| const { table } = require('../../../utils/table') | ||||||
| const aioLogger = require('@adobe/aio-lib-core-logging')('@adobe/aio-cli-plugin-events:provider:list', { provider: 'debug' }) | ||||||
|
|
||||||
| class ProviderListCommand extends BaseCommand { | ||||||
| async run () { | ||||||
| const { flags } = await this.parse(ProviderListCommand) | ||||||
| try { | ||||||
| await this.initSdk() | ||||||
| cli.action.start('Fetching all Event Providers') | ||||||
| ux.action.start('Fetching all Event Providers') | ||||||
| const options = { | ||||||
| fetchEventMetadata: flags.fetchEventMetadata, | ||||||
| filterBy: { | ||||||
|
|
@@ -29,7 +30,7 @@ class ProviderListCommand extends BaseCommand { | |||||
| } | ||||||
| } | ||||||
| const providers = await this.eventClient.getAllProviders(this.conf.org.id, options) | ||||||
| cli.action.stop() | ||||||
| ux.action.stop() | ||||||
| if (flags.json) { | ||||||
| this.printJson(providers) | ||||||
| } else if (flags.yml) { | ||||||
|
|
@@ -61,7 +62,7 @@ class ProviderListCommand extends BaseCommand { | |||||
| header: 'DOCS' | ||||||
| } | ||||||
| } | ||||||
| cli.table(projects, columns) | ||||||
| table(projects, columns) | ||||||
|
||||||
| table(projects, columns) | |
| table(projects, columns, { printLine: this.log.bind(this) }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the
test/**/*.jsande2e/**/*.jsoverrides,...pluginJest.configs['flat/recommended']already includes therulesfield; re-specifyingrules: { ...pluginJest.configs['flat/recommended'].rules }is redundant and makes it easier for the two to get out of sync if one side changes.Consider removing the redundant
rulesassignments (keeping only the additional overrides you need).