Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Add WorkerType functionality (replaces #178) #247

Merged
merged 3 commits into from
Jun 30, 2020

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Jun 27, 2020

This PR contains a:

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

Motivation / Use-Case

Allows worker-loader to create other worker types by adding an option workerType which defaults to Worker but could be used to create ServiceWorker or SharedWorker.

Breaking Changes

None

Additional Info

This is an updated version of #178

Signed-off-by: Andrew Thornton art27@cantab.net

@jsf-clabot
Copy link

jsf-clabot commented Jun 27, 2020

CLA assistant check
All committers have signed the CLA.

@zeripath zeripath force-pushed the shared-worker branch 2 times, most recently from c9b6858 to 4500188 Compare June 27, 2020 20:29
This is a slightly adjusted version of webpack-contrib#178

Signed-off-by: Andrew Thornton <art27@cantab.net>
@codecov
Copy link

codecov bot commented Jun 27, 2020

Codecov Report

Merging #247 into master will decrease coverage by 7.02%.
The diff coverage is 21.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #247      +/-   ##
==========================================
- Coverage   66.31%   59.29%   -7.03%     
==========================================
  Files           6        6              
  Lines          95      113      +18     
  Branches       28       36       +8     
==========================================
+ Hits           63       67       +4     
- Misses         28       41      +13     
- Partials        4        5       +1     
Impacted Files Coverage Δ
src/workers/InlineWorker.js 0.00% <0.00%> (ø)
src/workers/index.js 70.00% <45.45%> (-30.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 0efd0e4...dd3543f. Read the comment docs.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Let's rename shardWorker to workerType: 'Worker' | 'ServiceWorker' | etc, it is allow to implement any worker in the future

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath changed the title Add SharedWorker functionality (replaces #178) Add WorkerType functionality (replaces #178) Jun 30, 2020
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Good job, I will add tests in near future

@alexander-akait alexander-akait merged commit f03498d into webpack-contrib:master Jun 30, 2020
@zeripath zeripath deleted the shared-worker branch June 30, 2020 13:32
TheLD6978 pushed a commit to TheLD6978/worker-loader that referenced this pull request Apr 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants