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

fix: respected style field from package.json #1099

merged 7 commits into from Jul 7, 2020

Conversation

@cap-Bernardito
Copy link
Contributor

cap-Bernardito commented Jul 2, 2020

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 Jul 3, 2020
@cap-Bernardito cap-Bernardito force-pushed the issue-683 branch from c2947ba to 4ae4e5c Jul 3, 2020
mainFiles: ['index', '...'],
extensions: ['.css'],
restrictions: [/\.css$/i],
});

This comment has been minimized.

@evilebottnawi

evilebottnawi Jul 3, 2020 Member

conditionNames: ['style'],

@cap-Bernardito cap-Bernardito force-pushed the issue-683 branch from 8226b65 to 00a90e1 Jul 4, 2020
@cap-Bernardito cap-Bernardito marked this pull request as ready for review Jul 4, 2020
@evilebottnawi evilebottnawi merged commit edf5347 into master Jul 7, 2020
23 of 25 checks passed
23 of 25 checks passed
Lint - ubuntu-latest - Node v12.x
Details
Test - ubuntu-latest - Node v8.x, Webpack latest
Details
Test - ubuntu-latest - Node v10.x, Webpack latest
Details
Test - ubuntu-latest - Node v10.x, Webpack next
Details
Test - ubuntu-latest - Node v12.x, Webpack latest
Details
Test - ubuntu-latest - Node v12.x, Webpack next
Details
Test - ubuntu-latest - Node v14.x, Webpack latest
Details
Test - ubuntu-latest - Node v14.x, Webpack next
Details
Test - windows-latest - Node v8.x, Webpack latest
Details
Test - windows-latest - Node v10.x, Webpack latest
Details
Test - windows-latest - Node v10.x, Webpack next
Details
Test - windows-latest - Node v12.x, Webpack latest Test - windows-latest - Node v12.x, Webpack latest
Details
Test - windows-latest - Node v12.x, Webpack next
Details
Test - windows-latest - Node v14.x, Webpack latest
Details
Test - windows-latest - Node v14.x, Webpack next
Details
Test - macos-latest - Node v8.x, Webpack latest
Details
Test - macos-latest - Node v10.x, Webpack latest
Details
Test - macos-latest - Node v10.x, Webpack next
Details
Test - macos-latest - Node v12.x, Webpack latest
Details
Test - macos-latest - Node v12.x, Webpack next
Details
Test - macos-latest - Node v14.x, Webpack latest
Details
Test - macos-latest - Node v14.x, Webpack next
Details
codecov/patch 93.54% of diff hit (target 97.29%)
Details
codecov/project 96.77% (+-0.53%) compared to fcdc1ab
Details
licence/cla Contributor License Agreement is signed.
Details
@evilebottnawi evilebottnawi deleted the issue-683 branch Jul 7, 2020
@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.

@evilebottnawi
Copy link
Member

evilebottnawi commented Jul 13, 2020

@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],

This comment has been minimized.

@andersk

andersk Aug 13, 2020

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.