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

build(export): exclude unnecessary files from dist package #696

Merged
merged 1 commit into from
Jan 12, 2023
Merged

build(export): exclude unnecessary files from dist package #696

merged 1 commit into from
Jan 12, 2023

Conversation

ramsey
Copy link
Contributor

@ramsey ramsey commented Jan 11, 2023

Description

As I was analyzing files in my project's vendor/ directory, I noticed there were a lot of files included for auth0/auth0-php, since it doesn't have a .gitattributes file telling GitHub what to exclude from the exported zipped files (that Composer downloads).

By including a .gitattributes file that excludes files that aren't necessary for dependents, we save space and bandwidth.

This only affects the zipped files exported from GitHub (i.e., .zip and .tar.gz), which are primarily used by package managers (i.e., Composer) when installing project dependencies.

At a high level, here's what the directory looks like before this change:

❯ tree -L 1 -a -F --dirsfirst
./
├── .github/
├── docs/
├── src/
├── tests/
├── .editorconfig
├── .gitignore
├── .shiprc
├── .styleci.yml
├── CHANGELOG.md
├── EXAMPLES.md
├── LICENSE.md
├── README.md
├── UPGRADE.md
├── composer.json
├── opslevel.yml
├── phpdoc.dist.xml
├── phpstan.neon.dist
├── phpunit.xml.dist
├── pint.json
├── psalm.xml.dist
└── rector.php

5 directories, 17 files

And here's what it looks like after this change:

❯ tree -L 1 -a -F --dirsfirst
./
├── src/
├── LICENSE.md
├── README.md
└── composer.json

2 directories, 3 files

Type of change

  • Build improvement

Checklist

@ramsey ramsey requested a review from a team as a code owner January 11, 2023 22:13
@github-actions
Copy link
Contributor

👋 Thanks for contributing! Please be patient while a maintainer reviews your PR. In the meantime, please make sure you've read our contributing guide.

@github-actions github-actions bot added Status: ⏳ Needs Review Scope: Maintenance Changes to the build process or auxiliary tools and libraries. labels Jan 11, 2023
@evansims evansims self-assigned this Jan 12, 2023
@evansims evansims added this to the 8.3.9 milestone Jan 12, 2023
@codecov-commenter
Copy link

Codecov Report

Base: 94.46% // Head: 94.46% // No change to project coverage 👍

Coverage data is based on head (2d7d49a) compared to base (e139ae0).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #696   +/-   ##
=========================================
  Coverage     94.46%   94.46%           
  Complexity     1285     1285           
=========================================
  Files            65       65           
  Lines          4441     4441           
=========================================
  Hits           4195     4195           
  Misses          246      246           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@evansims
Copy link
Member

evansims commented Jan 12, 2023

Hey @ramsey 👋 Thanks very much for taking the time to prepare this contribution, it's genuinely appreciated. You're quite right, the SDK could definitely benefit from a little trim down. I'll get this merged to be shipped in the next release. 👍

@evansims evansims merged commit 544964b into auth0:main Jan 12, 2023
@ramsey ramsey deleted the build/export branch January 12, 2023 19:05
@evansims evansims modified the milestones: 8.3.9, 8.4.0 Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Maintenance Changes to the build process or auxiliary tools and libraries.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants