Skip to content
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

fix: console #534

Merged
merged 1 commit into from
Jun 27, 2023
Merged

fix: console #534

merged 1 commit into from
Jun 27, 2023

Conversation

elrrrrrrr
Copy link
Member

remove console.log


去除 console.log

@@ -94,7 +94,6 @@ export class SavePackageVersionController extends AbstractController {
// if pkg already exists, still allow to publish
const [ scope, name ] = getScopeAndName(fullname);
const pkg = await this.packageRepository.findPackage(scope, name);
console.log('pkg', pkg);
if (!pkg) {
const errors = (validateResult.errors || validateResult.warnings).join(', ');
throw new UnprocessableEntityError(`package.name invalid, errors: ${errors}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码的修改内容相对较少,主要是删除了一行console.log('pkg', pkg);语句。从代码安全和性能优化角度考虑,去掉这行调试信息并不会带来什么风险或者显著的改进。

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #534 (c8c8466) into master (20ffba8) will decrease coverage by 0.06%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #534      +/-   ##
==========================================
- Coverage   97.03%   96.98%   -0.06%     
==========================================
  Files         174      174              
  Lines       16561    16560       -1     
  Branches     2171     2167       -4     
==========================================
- Hits        16070    16060      -10     
- Misses        491      500       +9     
Impacted Files Coverage Δ
...controller/package/SavePackageVersionController.ts 100.00% <ø> (ø)

... and 2 files with indirect coverage changes

@gemwuu gemwuu self-requested a review June 27, 2023 04:04
@elrrrrrrr elrrrrrrr requested review from fengmk2 and killagu June 27, 2023 04:19
Copy link
Contributor

@killagu killagu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elrrrrrrr elrrrrrrr merged commit 4141003 into master Jun 27, 2023
@elrrrrrrr elrrrrrrr deleted the fix-console branch June 27, 2023 04:29
fengmk2 pushed a commit that referenced this pull request Jun 27, 2023
[skip ci]

## [3.34.9](v3.34.8...v3.34.9) (2023-06-27)

### Bug Fixes

* console ([#534](#534)) ([4141003](4141003))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants