Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: remove unused attributes
  • Loading branch information
jdanil committed Jun 5, 2022
commit 56703af6f54e71b5cd035c25526289cd0b7d9c84
6 changes: 3 additions & 3 deletions packages/plugin-compat/sources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ const PATCHES = new Map([

const plugin: Plugin<CoreHooks & PatchHooks> = {
hooks: {
registerPackageExtensions: async ({ configuration, registerPackageExtension }) => {
registerPackageExtensions: async ({ registerPackageExtension }) => {
for (const [descriptorStr, extensionData] of packageExtensions) {
registerPackageExtension(structUtils.parseDescriptor(descriptorStr, true), extensionData);
}
},

getBuiltinPatch: async ({ project, name }) => {
getBuiltinPatch: async ({ name }) => {
const TAG = `compat/`;
if (!name.startsWith(TAG))
return undefined;
Expand All @@ -31,7 +31,7 @@ const plugin: Plugin<CoreHooks & PatchHooks> = {
return typeof patch !== `undefined` ? patch : null;
},

reduceDependency: async ({ dependency, project, locator, initialDescriptor }) => {
reduceDependency: async ({ dependency }) => {
const patch = PATCHES.get(dependency.identHash);
if (typeof patch === `undefined`)
return dependency;
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-npm/sources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface Hooks {
* specific registry.
*/
getNpmAuthenticationHeader?: ({ currentHeader, registry, configuration, ident }: {
currentHeader: string | undefined,
currentHeader?: string,
registry: string,
configuration: Configuration,
ident?: Ident,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-npm/sources/npmHttpUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ async function getAuthenticationHeader(registry: string, {authType = AuthType.CO

const header = await configuration.reduceHook((hooks: Hooks) => {
return hooks.getNpmAuthenticationHeader;
}, {currentHeader: undefined, registry, configuration, ident});
}, {registry, configuration, ident});

if (header)
return header;
Expand Down
9 changes: 3 additions & 6 deletions packages/plugin-typescript/sources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ const getTypesName = (descriptor: Descriptor) => {
: `${descriptor.name}`;
};

const afterWorkspaceDependencyAddition = async ({ workspace, dependencyTarget, descriptor, strategies }: {
const afterWorkspaceDependencyAddition = async ({ workspace, descriptor }: {
workspace: Workspace,
dependencyTarget: suggestUtils.Target,
descriptor: Descriptor,
strategies: Array<suggestUtils.Strategy>,
}) => {
if (descriptor.scope === `types`)
return;
Expand Down Expand Up @@ -107,9 +105,8 @@ const afterWorkspaceDependencyAddition = async ({ workspace, dependencyTarget, d
}
};

const afterWorkspaceDependencyRemoval = async ({ workspace, dependencyTarget, descriptor }: {
const afterWorkspaceDependencyRemoval = async ({ workspace, descriptor }: {
workspace: Workspace,
dependencyTarget: suggestUtils.Target,
descriptor: Descriptor,
}) => {
if (descriptor.scope === `types`)
Expand Down Expand Up @@ -138,7 +135,7 @@ const afterWorkspaceDependencyRemoval = async ({ workspace, dependencyTarget, de
}
};

const beforeWorkspacePacking = ({ workspace, rawManifest }: { workspace: Workspace, rawManifest: any }) => {
const beforeWorkspacePacking = ({ rawManifest }: { rawManifest: any }) => {
if (rawManifest.publishConfig && rawManifest.publishConfig.typings)
rawManifest.typings = rawManifest.publishConfig.typings;

Expand Down