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 : Handle absolute paths for custom inject source #222

Open
wants to merge 10 commits into
base: feat/abs-paths
Choose a base branch
from

Conversation

purohitdheeraj
Copy link
Contributor

What changed / motivation ?

Handle absolute paths for custom inject source
checks for absolute and relative path

Linked PR/Issues

Fixes #211

Additional Context

i will move forward with importSources once this gets approved

Pre-flight checklist

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 20, 2023
runtimeInjection.startsWith('./') ||
runtimeInjection.startsWith('../')
) {
const absolutePath = path.join(rootDir, runtimeInjection);
Copy link
Contributor

@nonzzz nonzzz Dec 21, 2023

Choose a reason for hiding this comment

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

I think should add a normalize function to remove platform differences.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

you mean path.normalize(path.join()) ?

Copy link
Contributor

Choose a reason for hiding this comment

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

nmn and others added 5 commits January 7, 2024 05:06
* Fix: Validate options passed into the Babel plugin

* Add full validation for options with good errors
* Docs: Fix code example typo (facebook#290)

* Handle `keyframe` within `defineVars`

* Add test

* Format

* Fix grammar

* Update stylex-validation-define-vars-test.js

---------

Co-authored-by: k14lb3 <76220140+k14lb3@users.noreply.github.com>
* Add eslint-plugin package

* Add initial test suite

* Improve CSS handling and tests

* Address some of the comments

* Add babel scripts for jsx, flow and ts

* Add package diff

* Add snapshots and fix nits

* Fix rename bug

* Add esbuild example app

* Fix incorrect loaders

* Update package-lock.json

* Remove unnecessary file

* Fix some nits in example

* Add additional style to text fixture

* Remove ext from import in example

* Address some of the comments

* Update package-lock.json

* Add missing function call and snapshot

* Remove comment

* Pluralize function name

* Add types

* Fix build script

* Add docs

* Fix tabulation

* Retake snapshots

* Format prettier

* Add more missing types

* Run formatter

* Fix formatting

* Lock dependency and fix import

* Disable unused key

* Add docs

* Update package-lock.json

* Update package-lock.json

* Add snapshots

* Address comments
@nmn nmn changed the base branch from main to release/v0.5.0 January 8, 2024 08:50
@nmn nmn changed the base branch from release/v0.5.0 to feat/abs-paths January 24, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue] Handle absolute paths for alternate inject source
5 participants