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: exclude development files for npm resolves #567 #568

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

ghassanmas
Copy link
Member

This ready for review

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jul 9, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Jul 9, 2024

Thanks for the pull request, @ghassanmas!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently unmaintained.

To get help with finding a technical reviewer, tag the community contributions project manager for this PR in a comment and let them know that your changes are ready for review:

  1. On the right-hand side of the PR, find the Contributions project, click the caret in the top right corner to expand it, and check the "Primary PM" field for the name of your PM.
  2. Find their GitHub handle here.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@ghassanmas ghassanmas force-pushed the fix-567 branch 2 times, most recently from 7f60066 to 3782d1e Compare July 9, 2024 21:41
@ghassanmas ghassanmas changed the title build: eculde example directory for npm resolved #567 build: exclude example directory for npm resolves #567 Jul 9, 2024
@ghassanmas ghassanmas force-pushed the fix-567 branch 2 times, most recently from 042696d to 27182e5 Compare July 10, 2024 12:17
@dcoa
Copy link
Contributor

dcoa commented Jul 12, 2024

Thank you @ghassanmas for this PR, I agree about excluding the example folder for the npm versions, however, could you explain the reasoning behind removing the apple.png image?

After reviewing the npm package I think a better way to do this could be to add in the package.json

  "files": [
    "/bin",
    "/config",
    "/lib",
    "tsconfig.json"
  ],

and remove the .npmignore (the file we are ignoring does not exist in any case)

The package will be
image

What do you think?

C.C @brian-smith-tcril

@ghassanmas
Copy link
Member Author

could you explain the reasoning behind removing the apple.png image

It's not removed, but may github diff UX/UI is confusing, the file has been compressed.

@dcoa the file/folder example exists, in node_models when you install frontend-build as dependency, I am not sure about files in pacakge.json, but if npm tooling take it into considration then it could be other way to do it

@dcoa
Copy link
Contributor

dcoa commented Jul 12, 2024

Apparently, during the compressing process, the file has been corrupted, that's why GitHub does not display it and the tests are not passing, could you fix that?

Sorry for the misunderstanding, when I said "the file does not exist" I was referring to the commitlint.config.js.

I prefer to use files, in this way we have better control over what is included in the distribution version, the description about it is here

@dcoa dcoa self-requested a review July 12, 2024 14:56
@ghassanmas
Copy link
Member Author

Apparently, during the compressing process, the file has been corrupted, that's why GitHub does not display it and the tests are not passing, could you fix that?

Oh yes just fixed it...

Sorry for the misunderstanding, when I said "the file does not exist" I was referring to the commitlint.config.js.

Aha true do you want to remove it, it was there from the place, may be it exists by default...

I prefer to use files, in this way we have better control over what is included in the distribution version, the description about it is here

I see I think if use files then we will have to enter everything, right? which make the array too large

@dcoa
Copy link
Contributor

dcoa commented Jul 16, 2024

I see I think if use files then we will have to enter everything, right? which make the array too large

I don't think the array gets large, it is these ones

  "files": [
    "/bin",
    "/config",
    "/lib",
    "tsconfig.json"
  ],

If we use the npmignore file, can we increase the scope of this PR not only to exclude the example folder but also these:

  • renovate.json
  • coverage
  • lib/**/tests
  • docs
  • .github
  • smoke-test.sh
  • .eslintignore
  • .eslintrc.js
  • .nvmrc

This way, we can push only the relevant files for the consumer application.

@ghassanmas
Copy link
Member Author

yes right, we need to exclude other files/directory beside, example. I deleted the .npmignore file.
Note, by default npm will ignore everything in .gitignore.

@itsjeyd itsjeyd added core contributor PR author is a Core Contributor (who may or may not have write access to this repo). waiting for eng review PR is ready for review. Review and merge it, or suggest changes. labels Jul 18, 2024
@dcoa dcoa changed the title build: exclude example directory for npm resolves #567 build: exclude development files for npm resolves #567 Jul 19, 2024
@dcoa
Copy link
Contributor

dcoa commented Jul 19, 2024

Thanks @ghassanmas, LGTM!!

@dcoa dcoa merged commit 3077617 into openedx:master Jul 19, 2024
5 checks passed
@openedx-webhooks
Copy link

@ghassanmas 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@openedx-semantic-release-bot

🎉 This PR is included in version 14.0.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

@openedx-semantic-release-bot

🎉 This PR is included in version 15.0.0-alpha.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@itsjeyd itsjeyd removed the waiting for eng review PR is ready for review. Review and merge it, or suggest changes. label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U released on @alpha released
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants