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

refactor: do not infer project root from script location #1202

Merged
merged 5 commits into from
Nov 22, 2021

Conversation

erisu
Copy link
Member

@erisu erisu commented Nov 19, 2021

Motivation and Context

The goal of this PR is to eliminate all areas where our JS library expects to be located inside the project directory.

This is to prepare for a change that will keep the library in node_modules and not copy it to the platform project.

Description

Basically this passes the project root that has been passed to Api to all places that need it but do not yet have it.

This also extends the E2E tests to check that we do not have to require the Api from the platform project folder.

Testing

  • npm t

Checklist

  • I've run the tests to see all new and existing tests pass

@erisu erisu added this to the 7.0.0 milestone Nov 19, 2021
That change seems unrelated to the scope of this PR. Moreover, it seems
we could delete the whole following conditional as well, since we
removed support for the platform-centric workflow.
logPath was "$cordovaPath/console.log" before and had been changed to
"$projectPath/console.log". This commit reverts that change.
Not pretty either, but at least the ugliness is more local
Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

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

I pushed a few commits with suggestions. Explanations are in the respective commit messages. Otherwise these changes look good to me!

@raphinesse
Copy link
Contributor

The added test mentioned in the PR comment is not here, but that's OK. I take it that you just copied the text from my corresponding android PR? 😁

@codecov-commenter
Copy link

codecov-commenter commented Nov 20, 2021

Codecov Report

Merging #1202 (9c3fa18) into master (1dbf072) will decrease coverage by 0.06%.
The diff coverage is 62.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1202      +/-   ##
==========================================
- Coverage   75.15%   75.09%   -0.07%     
==========================================
  Files          13       13              
  Lines        1658     1658              
==========================================
- Hits         1246     1245       -1     
- Misses        412      413       +1     
Impacted Files Coverage Δ
bin/templates/scripts/cordova/lib/run.js 21.97% <50.00%> (-1.10%) ⬇️
bin/templates/scripts/cordova/lib/build.js 44.44% <66.66%> (ø)
bin/templates/scripts/cordova/Api.js 70.58% <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 1dbf072...9c3fa18. Read the comment docs.

@erisu erisu merged commit 457bfa0 into apache:master Nov 22, 2021
@erisu erisu deleted the refactor/dirname-neq-project branch November 22, 2021 01:13
gazben pushed a commit to apicore-engineering/cordova-ios that referenced this pull request Aug 26, 2022
Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants