Skip to content

Commit

Permalink
remove outdated kpm parts (yarnpkg#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
chicoxyzzy authored and bestander committed Oct 17, 2016
1 parent b584b4f commit 3dd0264
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/cli/commands/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export async function getToken(config: Config, reporter: Reporter, name: string
};
}

const env = process.env.YARN_AUTH_TOKEN || process.env.KPM_AUTH_TOKEN || process.env.NPM_AUTH_TOKEN;
const env = process.env.YARN_AUTH_TOKEN || process.env.NPM_AUTH_TOKEN;
if (env) {
config.registries.npm.setToken(`Bearer ${env}`);
return function revoke(): Promise<void> {
Expand Down
7 changes: 1 addition & 6 deletions src/registries/npm-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,7 @@ export default class NpmRegistry extends Registry {
const config = ini.parse(file);

// normalize offline mirror path relative to the current npmrc
let offlineLoc = config['yarn-offline-mirror'];
// old kpm compatibility
if (config['kpm-offline-mirror']) {
offlineLoc = config['kpm-offline-mirror'];
delete config['kpm-offline-mirror'];
}
const offlineLoc = config['yarn-offline-mirror'];
// don't normalize if we already have a mirror path
if (!this.config['yarn-offline-mirror'] && offlineLoc) {
const mirrorLoc = config['yarn-offline-mirror'] = path.resolve(path.dirname(loc), offlineLoc);
Expand Down

0 comments on commit 3dd0264

Please sign in to comment.