Skip to content

Rename Register to Service; re-export as Register for backwards… - #1158

Merged
cspotcode merged 3 commits into
masterfrom
ab/rename-register-to-service
Dec 3, 2020
Merged

Rename Register to Service; re-export as Register for backwards…#1158
cspotcode merged 3 commits into
masterfrom
ab/rename-register-to-service

Conversation

@cspotcode

@cspotcodecspotcode commented Nov 22, 2020

Copy link
Copy Markdown
Collaborator

Based on conversation here: #1121 (comment)

create() will create a Service. register() will create and register it into the node runtime. But the object itself is not really a Register (noun), it's a Service which handles compilation.

Other names could be Compiler, TsNodeCompiler, or Compiler?

@codecov

codecovBot commented Nov 22, 2020

Copy link
Copy Markdown

Codecov Report

Merging #1158 (cee6007) into master (8b9489a) will decrease coverage by 0.26%.
The diff coverage is 75.00%.

Impacted file tree graph

@@ Coverage Diff @@## master #1158 +/- ##
==========================================
- Coverage 79.60% 79.33% -0.27% 
==========================================
Files 7 11 +4 Lines 711 755 +44 Branches 158 157 -1 ==========================================
+ Hits 566 599 +33 - Misses 89 101 +12 + Partials 56 55 -1 
FlagCoverage Δ
node_1076.20% <75.00%> (+0.09%)⬆️
node_12_1576.55% <75.00%> (+0.09%)⬆️
node_12_1676.55% <75.00%> (+0.09%)⬆️
node_1378.67% <75.00%> (-0.23%)⬇️
node_1478.67% <75.00%> (-0.23%)⬇️
node_14_13_077.88% <75.00%> (-0.18%)⬇️
node_1578.67% <75.00%> (-0.23%)⬇️
typescript_2_778.67% <75.00%> (-0.23%)⬇️
typescript_latest77.88% <75.00%> (-0.18%)⬇️
typescript_next77.88% <75.00%> (-0.18%)⬇️
ubuntu78.54% <75.00%> (-0.22%)⬇️
windows78.67% <75.00%> (-0.23%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted FilesCoverage Δ
src/index.ts79.20% <66.66%> (+0.14%)⬆️
src/bin.ts79.19% <100.00%> (ø)
dist-raw/node-options.js78.37% <0.00%> (-0.41%)⬇️
dist-raw/node-errors.js66.66% <0.00%> (ø)
dist-raw/node-package-json-reader.js84.21% <0.00%> (ø)
dist-raw/node-internal-fs.js75.00% <0.00%> (ø)
dist-raw/node-primordials.js50.00% <0.00%> (ø)
dist-raw/node-cjs-loader-utils.js83.67% <0.00%> (+3.28%)⬆️

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 8b9489a...cee6007. Read the comment docs.

@blakeembreyblakeembrey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome, thanks!

Comment threadsrc/index.ts Outdated
function registerExtension (
ext: string,
register: Register,
register: Service,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we rename this variable too?

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Yeah, good catch.

Sign up for freeto 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.

2 participants

@cspotcode@blakeembrey