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: respected style field from package.json #1099

Merged
merged 7 commits into from
Jul 7, 2020
Merged

Conversation

cap-Bernardito
Copy link
Member

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Fixes #683

  • respected style field from package.json
  • add restrictions

Breaking Changes

No

Additional Info

No

@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

Merging #1099 into master will decrease coverage by 0.52%.
The diff coverage is 93.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1099      +/-   ##
==========================================
- Coverage   97.29%   96.77%   -0.53%     
==========================================
  Files          10       10              
  Lines         481      527      +46     
  Branches      162      174      +12     
==========================================
+ Hits          468      510      +42     
- Misses         12       16       +4     
  Partials        1        1              
Impacted Files Coverage Δ
src/plugins/postcss-icss-parser.js 96.87% <ø> (ø)
src/plugins/postcss-import-parser.js 92.53% <91.80%> (-3.55%) ⬇️
src/utils.js 98.52% <95.83%> (-0.38%) ⬇️
src/index.js 100.00% <100.00%> (ø)
src/plugins/postcss-url-parser.js 97.33% <100.00%> (+0.07%) ⬆️

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 fcdc1ab...ed56563. Read the comment docs.

@cap-Bernardito cap-Bernardito force-pushed the issue-683 branch 2 times, most recently from bbea9c7 to c2947ba Compare July 3, 2020 11:58
mainFiles: ['index', '...'],
extensions: ['.css'],
restrictions: [/\.css$/i],
});
Copy link
Member

Choose a reason for hiding this comment

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

conditionNames: ['style'],

@cap-Bernardito cap-Bernardito marked this pull request as ready for review July 4, 2020 15:59
@arshaw
Copy link

arshaw commented Jul 12, 2020

@cap-Bernardito, question for you: did this ever work? Was the style field in package.json ever respected? This old issue here makes me think that it was.

@alexander-akait
Copy link
Member

@arshaw And yes and no, before this commit you need to setup the style field in your configuration, now you don't need this, because it is out of box

mainFields: ['css', 'style', 'main', '...'],
mainFiles: ['index', '...'],
extensions: ['.css'],
restrictions: [/\.css$/i],
Copy link

Choose a reason for hiding this comment

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

This restriction broke @import for files with an extension other than .css (#1164). Can we remove it (#1165)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Style field from package.json not respected
4 participants