Skip to content
This repository was archived by the owner on Mar 11, 2026. It is now read-only.

build: release minified package under new name#1063

Merged
freelerobot merged 16 commits intomasterfrom
minPackage
May 12, 2021
Merged

build: release minified package under new name#1063
freelerobot merged 16 commits intomasterfrom
minPackage

Conversation

@freelerobot
Copy link
Copy Markdown
Contributor

Fixes #1037 🦕

@freelerobot freelerobot self-assigned this May 10, 2021
@product-auto-label product-auto-label Bot added the api: logging Issues related to the googleapis/nodejs-logging API. label May 10, 2021
@freelerobot freelerobot added the priority: p2 Moderately-important priority. Fix may not be included in next release. label May 10, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label May 10, 2021
@codecov
Copy link
Copy Markdown

codecov Bot commented May 10, 2021

Codecov Report

Merging #1063 (4574804) into master (2496d2a) will decrease coverage by 0.01%.
The diff coverage is 93.87%.

❗ Current head 4574804 differs from pull request most recent head b06110f. Consider uploading reports for the commit b06110f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1063      +/-   ##
==========================================
- Coverage   97.90%   97.88%   -0.02%     
==========================================
  Files          18       18              
  Lines       13245    13162      -83     
  Branches      428      420       -8     
==========================================
- Hits        12967    12884      -83     
  Misses        275      275              
  Partials        3        3              
Impacted Files Coverage Δ
src/v2/logging_service_v2_client.ts 98.71% <88.09%> (-0.02%) ⬇️
src/v2/metrics_service_v2_client.ts 98.57% <90.19%> (-0.02%) ⬇️
src/v2/config_service_v2_client.ts 98.77% <96.66%> (-0.02%) ⬇️
src/entry.ts 99.53% <100.00%> (ø)
src/log.ts 99.81% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 561b50c...b06110f. Read the comment docs.

@freelerobot freelerobot marked this pull request as ready for review May 10, 2021 07:19
@freelerobot freelerobot requested review from a team May 10, 2021 07:19
@generated-files-bot
Copy link
Copy Markdown

generated-files-bot Bot commented May 11, 2021

Warning: This pull request is touching the following templated files:

Copy link
Copy Markdown

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

If we are going with this route, I'd prefer that the build logic is encapsulated in npm scripts.

My preference would be to eventually make this experiment its own GitHub repository, to give you more flexibility with regards to what a smaller version of the logging library looks like ... this feels gross.

I can understand starting the experiment in the same repository, not blocking for me; but I'd rather we pull more logic into npm scripts, which will benefit you when/if we split this out into its own repository.

Comment thread .kokoro/publish.sh Outdated
done

# Change and publish under package name `@google-cloud/logging-min`
sed -i -e 's/"name": "@google-cloud\/logging"/"name": "@google-cloud\/logging-min"/' package.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This seems a little hacky to me, I was picturing we'd perhaps just make a new repository for this use case.

Is this the eventual plan?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes this is the eventual plan. Doc shared for your review in our chat.

Comment thread .kokoro/publish.sh Outdated

if [ -f "$f.map" ]; then
# Keep original .ts source mappings
uglifyjs --source-map "content='$f.map', url='$f.map'" "$f" --output "$f"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would prefer we pull the logic for minifying into package.json scripts, so that when you want the minified version you can just go:

npm compile-min

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This minifies the amount that the publication script deviates from our usual publication script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea. My previous attempt did this - and we can just have a new publish-min script. Will modify

Copy link
Copy Markdown

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

Approving, so that I'm not blocking your work (since I think we're still on different time zones.).

The actionable feedback I have is that I have a preference for us capturing the build process in npm scripts 👍

@freelerobot freelerobot added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 12, 2021
@freelerobot freelerobot removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 12, 2021
@freelerobot freelerobot merged commit 236a466 into master May 12, 2021
@freelerobot freelerobot deleted the minPackage branch May 12, 2021 07:39
freelerobot added a commit that referenced this pull request May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: logging Issues related to the googleapis/nodejs-logging API. cla: yes This human has signed the Contributor License Agreement. priority: p2 Moderately-important priority. Fix may not be included in next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce dependencies & library binary

3 participants