Skip to content

Commit

Permalink
Merge branch 'master' into alicanc-run-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian McKenzie authored Oct 15, 2016
2 parents 2d1cc8b + 7a18523 commit 95d34eb
Show file tree
Hide file tree
Showing 37 changed files with 483 additions and 186 deletions.
6 changes: 4 additions & 2 deletions __tests__/__mocks__/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ const httpMock = {
request(options: Object, callback?: ?Function): ClientRequest {
const alias = getRequestAlias(options);
const loc = path.join(CACHE_DIR, `${alias}.bin`);
// allow the client to bypass the local fs fixture cache by adding nocache to the query string
const allowCache = options.uri.href.indexOf('nocache') == -1;

// TODO better way to do this
const httpModule = options.port === 443 ? https : http;
const httpModule = options.uri.href.startsWith('https:') ? https : http;

if (fs.existsSync(loc)) {
if (allowCache && fs.existsSync(loc)) {
// cached
options.agent = null;
options.socketPath = null;
Expand Down
57 changes: 57 additions & 0 deletions __tests__/fixtures/certificates/cacerts.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
the first CA is a random CA not used in this test, to verify
that multiple CAs work
-----BEGIN CERTIFICATE-----
MIIFjTCCA3WgAwIBAgIRANOxciY0IzLc9AUoUSrsnGowDQYJKoZIhvcNAQELBQAw
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTYxMDA2MTU0MzU1
WhcNMjExMDA2MTU0MzU1WjBKMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
RW5jcnlwdDEjMCEGA1UEAxMaTGV0J3MgRW5jcnlwdCBBdXRob3JpdHkgWDMwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCc0wzwWuUuR7dyXTeDs2hjMOrX
NSYZJeG9vjXxcJIvt7hLQQWrqZ41CFjssSrEaIcLo+N15Obzp2JxunmBYB/Xk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Iti4+h/Soo4BmHetec7zKvHjsL1kuT9s43
YiVlj660cc/Rmqt61OqPrumeKeVLRLmOD71l0yjU8QEwvAvvzFwdTZQSPUVGb4Je
9Apxn7MNnKMCAwEAAaNQME4wHQYDVR0OBBYEFFzPIkvacjl8MFC6eRCwSTyW5z9c
MB8GA1UdIwQYMBaAFFzPIkvacjl8MFC6eRCwSTyW5z9cMAwGA1UdEwQFMAMBAf8w
DQYJKoZIhvcNAQELBQADggEBAKN9RXWgMuEwhLYzG///duWTcIC7UfamGDVlezxa
BkR+VGkRSlo4v+MaZKscG2D/NGh4PP5PQZr7okLQY6MIKmcFkIN1BDziEVfKICFs
AIrcajDLyHaLcAmZv2VJe1sz12pmGZG7uTOncMAngZoNDNI0f4djzvmRd9nn4yGo
o8vhLMzgdXhp3T7yaCjpbpZUd1bnggJXz9MO76EBcCkS3+HcRRr/0KMD/tk5tZUx
s35hnRrJi9HvhFjZbJA/KGG8DJp4oyzEfbufmUJ7OdbMn++W3NtG1BrRhbKmH5og
tpfAr88iJ6BFaXV/4JIxc4Fga8dvjJR3ueh5pT2om/rUzkQ=
-----END CERTIFICATE-----
another comment
21 changes: 21 additions & 0 deletions __tests__/fixtures/certificates/server-cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-----BEGIN CERTIFICATE-----
MIIDfzCCAmegAwIBAgIJAM4nWEf/MeHVMA0GCSqGSIb3DQEBCwUAMFYxCzAJBgNV
BAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0xNjEwMTIwNTQ3NDla
Fw0yNjEwMTAwNTQ3NDlaMFYxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0
IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxEjAQBgNVBAMMCWxv
Y2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALVCI5Ma6AR0
oDv/OqactDMR4pA6CZJnNDYbjRIkjsXi3pXuAXbQ8J/lD7EKNhu8wxrM0PZvdE1s
ERjgFmZlYYTJkoDQUr9HagwAhAHrUuAq6FsmogLOl1L4QmeddCxExLdTePJAvVxc
+fr3mk7I9Kt5FV1kDOZMyGqkLwKvcGXjx4ue+ZMgQZjWoU4Om7ktA57siAUkrxQg
SonEnlSAlEQy6/wRSR2XQ85e+o1JHMIti4+h/Soo4BmHetec7zKvHjsL1kuT9s43
YiVlj660cc/Rmqt61OqPrumeKeVLRLmOD71l0yjU8QEwvAvvzFwdTZQSPUVGb4Je
9Apxn7MNnKMCAwEAAaNQME4wHQYDVR0OBBYEFFzPIkvacjl8MFC6eRCwSTyW5z9c
MB8GA1UdIwQYMBaAFFzPIkvacjl8MFC6eRCwSTyW5z9cMAwGA1UdEwQFMAMBAf8w
DQYJKoZIhvcNAQELBQADggEBAKN9RXWgMuEwhLYzG///duWTcIC7UfamGDVlezxa
BkR+VGkRSlo4v+MaZKscG2D/NGh4PP5PQZr7okLQY6MIKmcFkIN1BDziEVfKICFs
AIrcajDLyHaLcAmZv2VJe1sz12pmGZG7uTOncMAngZoNDNI0f4djzvmRd9nn4yGo
o8vhLMzgdXhp3T7yaCjpbpZUd1bnggJXz9MO76EBcCkS3+HcRRr/0KMD/tk5tZUx
s35hnRrJi9HvhFjZbJA/KGG8DJp4oyzEfbufmUJ7OdbMn++W3NtG1BrRhbKmH5og
tpfAr88iJ6BFaXV/4JIxc4Fga8dvjJR3ueh5pT2om/rUzkQ=
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions __tests__/fixtures/certificates/server-key.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC1QiOTGugEdKA7
/zqmnLQzEeKQOgmSZzQ2G40SJI7F4t6V7gF20P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VxcKl4ISKUL54tcMhdL7S5Y18T7eFfuYUJ53gJGQ0e366/1kVzGA
CgLlJmVZoopZkxlzkRR2XiErbf4N+eEOQJeN+X3zM2ert8woGHBA7iP81QKBgBi0
3oo8zvbGhFr+0WsjuDHSOzi07/zy/1khulYoef4cLsWSzaXtgnZpeKuubsf6/Mvo
LaMzTWHSnDTEppFEPRdUYeh2snMi67kdzmZyvvEU/jUVWNaMXSyx4E/25Vve6Fpq
65s/Q3kcXTUx/bD4zfjyqzr02uNny4Op4kUAaRxdAoGBAK0t4FVXTOWIf6xxgGMZ
BBkNu6N1n/Io3pliCpYpZrBE/6NEOaEeniyaM0BbAatR+SemaYICnEj31ueonlIs
PLUi9H177Cnu2DZwBMaWx78r260RIxF+bcdTBjQ51fXt7/44okFjHmCcRVA1q/Rc
WdI83+niMywS/XVfLAMhnFWR
-----END PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"_error": "Fatal problem with name in manifest: must be a string"
"_error": "\"name\" is not a string"
}
36 changes: 36 additions & 0 deletions __tests__/util/request-manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* @flow */
/* eslint max-len: 0 */

import {NoopReporter} from '../../src/reporters/index.js';
import Config from '../../src/config.js';
import type {ConfigOptions} from '../../src/config.js';
import * as fs from '../../src/util/fs.js';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000;

const https = require('https');
const path = require('path');

async function createConfig(opts: ConfigOptions = {}): Promise<Config> {
const config = new Config(new NoopReporter());
await config.init(opts);
return config;
}

test('RequestManager.request with cafile', async () => {
let body;
const options = {
key: await fs.readFile(path.join(__dirname, '..', 'fixtures', 'certificates', 'server-key.pem')),
cert: await fs.readFile(path.join(__dirname, '..', 'fixtures', 'certificates', 'server-cert.pem')),
};
const server = https.createServer(options, (req, res) => { res.end('ok'); });
try {
server.listen(0);
const config = await createConfig({'cafile': path.join(__dirname, '..', 'fixtures', 'certificates', 'cacerts.pem')});
const port = server.address().port;
body = await config.requestManager.request({url: `https://localhost:${port}/?nocache`, headers: {Connection: 'close'}});
} finally {
server.close();
}
expect(body).toBe('ok');
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"death": "^1.0.0",
"debug": "^2.2.0",
"defaults": "^1.0.3",
"detect-indent": "^4.0.0",
"diff": "^2.2.1",
"eslint-plugin-react": "5.2.2",
"github": "2.5.1",
Expand Down
6 changes: 3 additions & 3 deletions src/cli/commands/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class Add extends Install {
const {dev, exact, tilde, optional, peer} = this.flags;

// get all the different registry manifests in this folder
const jsons = await this.getRootManifests();
const manifests = await this.config.getRootManifests();

// add new patterns to their appropriate registry manifest
for (const pattern of this.resolver.dedupePatterns(this.args)) {
Expand Down Expand Up @@ -134,7 +134,7 @@ export class Add extends Install {
}

// add it to manifest
const object = jsons[ref.registry].object;
const object = manifests[ref.registry].object;
for (const key of targetKeys) {
const target = object[key] = object[key] || {};
target[pkg.name] = version;
Expand All @@ -149,7 +149,7 @@ export class Add extends Install {
this.resolver.removePattern(pattern);
}

await this.saveRootManifests(jsons);
await this.config.saveRootManifests(manifests);
}
}

Expand Down
8 changes: 2 additions & 6 deletions src/cli/commands/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import type {Reporter} from '../../reporters/index.js';
import type Config from '../../config.js';
import {stringifyPerson} from '../../util/normalize-manifest/util.js';
import {registryNames} from '../../registries/index.js';
import Lockfile from '../../lockfile/wrapper.js';
import {Install} from './install.js';
import * as child from '../../util/child.js';
import * as fs from '../../util/fs.js';

Expand All @@ -22,9 +20,7 @@ export async function run(
flags: Object,
args: Array<string>,
): Promise<void> {
const lockfile = new Lockfile();
const install = new Install(flags, config, reporter, lockfile);
const manifests = await install.getRootManifests();
const manifests = await config.getRootManifests();

let gitUrl;
const author = {
Expand Down Expand Up @@ -137,5 +133,5 @@ export async function run(
reporter.success(`Saved ${path.basename(targetManifest.loc)}`);
}

await install.saveRootManifests(manifests);
await config.saveRootManifests(manifests);
}
65 changes: 3 additions & 62 deletions src/cli/commands/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import type {Manifest, DependencyRequestPatterns} from '../../types.js';
import type Config from '../../config.js';
import type {RegistryNames} from '../../registries/index.js';
import normalizeManifest from '../../util/normalize-manifest/index.js';
import {stringify} from '../../util/misc.js';
import {registryNames} from '../../registries/index.js';
import {MessageError} from '../../errors.js';
import Lockfile from '../../lockfile/wrapper.js';
Expand Down Expand Up @@ -42,14 +41,6 @@ export type InstallCwdRequest = [
Object
];

type RootManifests = {
[registryName: RegistryNames]: {
loc: string,
object: Object,
exists: boolean,
}
};

type IntegrityMatch = {
actual: string,
expected: string,
Expand Down Expand Up @@ -129,14 +120,6 @@ function normalizeFlags(config: Config, rawFlags: Object): Flags {
return flags;
}

const sortObject = (object) => {
const sortedObject = {};
Object.keys(object).sort().forEach((item) => {
sortedObject[item] = object[item];
});
return sortedObject;
};

export class Install {
constructor(
flags: Object,
Expand Down Expand Up @@ -445,7 +428,7 @@ export class Install {

// save resolutions to their appropriate root manifest
if (Object.keys(this.resolutions).length) {
const jsons = await this.getRootManifests();
const manifests = await this.config.getRootManifests();

for (const name in this.resolutions) {
const version = this.resolutions[name];
Expand All @@ -467,59 +450,17 @@ export class Install {
const ref = manifest._reference;
invariant(ref, 'expected reference');

const object = jsons[ref.registry].object;
const object = manifests[ref.registry].object;
object.resolutions = object.resolutions || {};
object.resolutions[name] = version;
}

await this.saveRootManifests(jsons);
await this.config.saveRootManifests(manifests);
}

return flattenedPatterns;
}

/**
* Get root manifests.
*/

async getRootManifests(): Promise<RootManifests> {
const manifests: RootManifests = {};
for (const registryName of registryNames) {
const registry = registries[registryName];
const jsonLoc = path.join(this.config.cwd, registry.filename);

let object = {};
let exists = false;
if (await fs.exists(jsonLoc)) {
exists = true;
object = await fs.readJson(jsonLoc);
}
manifests[registryName] = {loc: jsonLoc, object, exists};
}
return manifests;
}

/**
* Save root manifests.
*/

async saveRootManifests(manifests: RootManifests): Promise<void> {
for (const registryName of registryNames) {
const {loc, object, exists} = manifests[registryName];
if (!exists && !Object.keys(object).length) {
continue;
}

for (const field of constants.DEPENDENCY_TYPES) {
if (object[field]) {
object[field] = sortObject(object[field]);
}
}

await fs.writeFile(loc, stringify(object) + '\n');
}
}

/**
* Save updated integrity and lockfiles.
*/
Expand Down
15 changes: 12 additions & 3 deletions src/cli/commands/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@ async function getCredentials(config: Config, reporter: Reporter): Promise<?{
return {username, email};
}

export async function getToken(config: Config, reporter: Reporter): Promise<
export async function getToken(config: Config, reporter: Reporter, name: string = ''): Promise<
() => Promise<void>
> {
const auth = config.registries.npm.getAuth(name);
if (auth) {
config.registries.npm.setToken(auth);
return function revoke(): Promise<void> {
reporter.info(reporter.lang('notRevokingConfigToken'));
return Promise.resolve();
};
}

const env = process.env.YARN_AUTH_TOKEN || process.env.KPM_AUTH_TOKEN || process.env.NPM_AUTH_TOKEN;
if (env) {
config.registries.npm.setToken(env);
config.registries.npm.setToken(`Bearer ${env}`);
return function revoke(): Promise<void> {
reporter.info(reporter.lang('notRevokingEnvToken'));
return Promise.resolve();
Expand Down Expand Up @@ -80,7 +89,7 @@ export async function getToken(config: Config, reporter: Reporter): Promise<
reporter.success(reporter.lang('loggedIn'));

const token = res.token;
config.registries.npm.setToken(token);
config.registries.npm.setToken(`Bearer ${token}`);

return async function revoke(): Promise<void> {
reporter.success(reporter.lang('revokedToken'));
Expand Down
4 changes: 2 additions & 2 deletions src/cli/commands/owner.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function mutate(

const msgs = buildMessages(username, name);
reporter.step(1, 3, reporter.lang('loggingIn'));
const revoke = await getToken(config, reporter);
const revoke = await getToken(config, reporter, name);

reporter.step(2, 3, msgs.info);
const user = await config.registries.npm.request(`-/user/org.couchdb.user:${username}`);
Expand Down Expand Up @@ -160,7 +160,7 @@ export const {run, setFlags} = buildSubCommands('owner', {
const name = await getName(args, config);

reporter.step(1, 3, reporter.lang('loggingIn'));
const revoke = await getToken(config, reporter);
const revoke = await getToken(config, reporter, name);

reporter.step(2, 3, reporter.lang('ownerGetting', name));
const pkg = await config.registries.npm.request(name);
Expand Down
1 change: 1 addition & 0 deletions src/cli/commands/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const DEFAULT_IGNORE = ignoreLinesToRegex([
'*.swp',
'._*',
'npm-debug.log',
'yarn-error.log',
'.npmrc',
'.yarnrc',
'.npmignore',
Expand Down
Loading

0 comments on commit 95d34eb

Please sign in to comment.