Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GoogleCloudPlatform/nodejs-repo-tools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a7e65f68ad39ebff203ed625208e015dd9b40fb5
Choose a base ref
...
head repository: GoogleCloudPlatform/nodejs-repo-tools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dab4520b787a9574dcfd90aa07a1d5117ba074e8
Choose a head ref
  • 19 commits
  • 25 files changed
  • 6 contributors

Commits on Nov 9, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    12ad771 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    8057501 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    1c6b1cb View commit details
  4. 3.0.0 (#170)

    jmdobry authored Nov 9, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    171629c View commit details

Commits on Nov 10, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    7b4c419 View commit details

Commits on Dec 3, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    6b01ca3 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    4f8eabc View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    a80bec8 View commit details
  4. 3.1.0

    jmdobry committed Dec 3, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    5fa20b4 View commit details

Commits on Dec 4, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    0377806 View commit details

Commits on Dec 10, 2018

  1. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    8177db0 View commit details

Commits on Dec 18, 2018

  1. Fix npm run lint issues (#182)

    grant authored and JustinBeckwith committed Dec 18, 2018

    Verified

    This commit was signed with the committer’s verified signature.
    pan93412 pan93412
    Copy the full SHA
    a050711 View commit details

Commits on Jan 3, 2019

  1. Verified

    This commit was signed with the committer’s verified signature.
    jplatte Jonas Platte
    Copy the full SHA
    dfe3118 View commit details

Commits on Jan 14, 2019

  1. Copy the full SHA
    8b74621 View commit details

Commits on Feb 5, 2019

  1. Copy the full SHA
    cc3351a View commit details

Commits on Feb 7, 2019

  1. Copy the full SHA
    0c84d42 View commit details

Commits on Feb 12, 2019

  1. Copy the full SHA
    2b5d39b View commit details

Commits on Feb 14, 2019

  1. Copy the full SHA
    3aed3f2 View commit details
  2. 3.2.0

    jmdobry committed Feb 14, 2019
    Copy the full SHA
    dab4520 View commit details
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
##### 3.2.0 - 14 February 2019

- Update dependencies

##### 3.1.0 - 03 December 2018

- fix: fix: update badges on default readme (#175)
- fix: update eslint and jsdoc templates (#174)
- fix: remove contributors code (#173)

##### 3.0.0 - 09 November 2018

###### Breaking changes
- Removed the `lint` command and dependency on `semistandard`

##### 2.3.6 - 07 November 2018

###### Backwards compatible changes
12 changes: 0 additions & 12 deletions CONTRIBUTORS

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -43,8 +43,6 @@ Usage: `repo-tools --help` or `tools --help`
Commands:
exec Run a given command in /Users/jdobry/projects/nodejs-repo-tools.
generate <targets..> Generate the given target(s) in /Users/jdobry/projects/nodejs-repo-tools.
lint Lint files by running: semistandard in /Users/jdobry/projects/nodejs-repo-tools.
list List samples.
test Run a test sub-command.
unify (Node.js only) Recursively add sub-directory dependencies to the top-level package.json file.
2 changes: 1 addition & 1 deletion builders/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ RUN apt-get update -y && \
rm /var/lib/apt/lists/*_*

# Install the latest LTS release of nodejs
RUN mkdir /nodejs && curl https://nodejs.org/dist/v6.11.1/node-v6.11.1-linux-x64.tar.gz | tar xvzf - -C /nodejs --strip-components=1
RUN mkdir /nodejs && curl https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.gz | tar xvzf - -C /nodejs --strip-components=1
ENV PATH $PATH:/nodejs/bin

# Install the Repo Tools binary
2 changes: 1 addition & 1 deletion builders/nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -19,6 +19,6 @@ RUN set -ex \
&& mv yarn.js /usr/local/bin/yarn \
&& chmod +x /usr/local/bin/yarn

RUN yarn global add nyc codecov semistandard node-gyp
RUN yarn global add nyc codecov node-gyp

ENTRYPOINT ["node"]
2 changes: 1 addition & 1 deletion builders/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

This Container Builder build step runs the `node` tool.

It also installs Yarn, nyc, codecov, and semistandard.
It also installs Yarn, nyc, and codecov.

## Building this builder

2 changes: 1 addition & 1 deletion builders/ruby/README.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

This Container Builder build step runs the `node` tool.

It also install Yarn, nyc, codecov, and semistandard.
It also install Yarn, nyc, and codecov.

## Building this builder

71 changes: 25 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/nodejs-repo-tools",
"description": "Tools used to maintain and test Node.js repositories in the GoogleCloudPlaftorm organization.",
"version": "2.3.6",
"version": "3.2.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"engines": {
@@ -32,17 +32,6 @@
"./cjs/cli/commands/**/*.js"
]
},
"semistandard": {
"globals": [
"before",
"describe",
"it"
],
"ignore": [
"test/samples/nodejs/snippet/lint_error.js",
"cjs/**/*.js"
]
},
"nyc": {
"include": [
"cjs/**/*.js"
@@ -54,58 +43,48 @@
"env",
{
"targets": {
"node": "4.8.4"
"node": "10.15.1"
}
}
]
]
},
"contributors": [
"Ace Nassri <anassri@google.com>",
"Alexander Fenster <github@fenster.name>",
"Jason Dobry <jason.dobry@gmail.com>",
"Jason Dobry <jmdobry@users.noreply.github.com>",
"Luke Sneeringer <luke@sneeringer.com>",
"Stephen <stephenplusplus@users.noreply.github.com>",
"greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>"
],
"scripts": {
"clean": "node ./scripts/clean",
"build": "npm run clean && babel src --out-dir cjs",
"generate-scaffolding": "node ./bin/tools generate coc contributors license pkgjson",
"lint": "npm run build && node ./bin/tools lint --cmd eslint -- src/ test/",
"prettier": "npm run build && node ./bin/tools exec -- prettier --write 'src/{,**/,**/**/,**/**/**/}*.js' 'test/{,**/,**/**/,**/**/**/,**/**/**/**/,**/**/**/**/**/}*.js'",
"generate-scaffolding": "node ./bin/tools generate coc license pkgjson",
"lint": "npm run build && eslint src/ test/",
"fix": "npm run build && eslint --fix '**/*.js'",
"prepublishOnly": "npm run lint",
"release": "npm run prepublishOnly && node ./scripts/release",
"pretest": "npm run prepublishOnly",
"cover": "nyc --cache ava -v -T 1m -s && nyc report",
"test": "node ./bin/tools test run --cmd npm -- run cover"
},
"dependencies": {
"@sindresorhus/slugify": "^0.6.0",
"ava": "0.25.0",
"colors": "1.1.2",
"fs-extra": "^6.0.0",
"got": "^9.3.0",
"handlebars": "4.0.11",
"@sindresorhus/slugify": "^0.8.0",
"ava": "^1.2.1",
"colors": "^1.3.3",
"fs-extra": "^7.0.1",
"got": "^9.6.0",
"handlebars": "^4.1.0",
"lodash": "^4.17.11",
"nyc": "11.7.2",
"proxyquire": "^2.0.0",
"semistandard": "13.0.0",
"semver": "^5.5.0",
"sinon": "6.0.1",
"supertest": "^3.2.0",
"yargs": "^12.0.1",
"yargs-parser": "11.0.0"
"nyc": "^13.3.0",
"proxyquire": "^2.1.0",
"semver": "^5.6.0",
"sinon": "^7.2.3",
"supertest": "^3.4.2",
"yargs": "^13.1.0",
"yargs-parser": "^13.0.0"
},
"devDependencies": {
"babel-cli": "6.26.0",
"babel-preset-env": "1.6.1",
"codecov": "^3.1.0",
"eslint": "^4.18.2",
"eslint-config-prettier": "^2.10.0",
"eslint-plugin-node": "6.0.1",
"eslint-plugin-prettier": "^3.0.0",
"prettier": "^1.11.0"
"babel-preset-env": "1.7.0",
"codecov": "^3.2.0",
"eslint": "^5.13.0",
"eslint-config-prettier": "^4.0.0",
"eslint-plugin-node": "8.0.1",
"eslint-plugin-prettier": "^3.0.1",
"prettier": "^1.16.4"
}
}
28 changes: 0 additions & 28 deletions src/build_packs/build_pack.js
Original file line number Diff line number Diff line change
@@ -16,13 +16,9 @@
'use strict';

const _ = require('lodash');
const {execSync} = require('child_process');
const path = require('path');

const utils = require('../utils');

const TTY = process.platform === 'win32' ? 'CON' : '/dev/tty';

const globalOpts = {
global: {
dryRun: false,
@@ -31,10 +27,6 @@ const globalOpts = {
config: '.cloud-repo-tools.json',
configKey: null,
},
lint: {
cmd: 'lint',
args: [],
},
test: {
app: {},
build: {
@@ -63,26 +55,6 @@ const globalOpts = {
description: 'Generate a .github/CONTRIBUTING.md file.',
filename: '.github/CONTRIBUTING.md',
},
contributors: {
description: 'Generate a CONTRIBUTORS file.',
filename: 'CONTRIBUTORS',
addData(data, opts) {
try {
const output = execSync(`git shortlog -e -s < ${TTY}`, {
shell: true,
cwd: opts.localPath,
encoding: 'utf8',
});
data.contributors = output
.split('\n')
.filter(x => x)
.map(line => line.substring(line.indexOf('\t') + 1));
} catch (err) {
utils.logger.error('generate', 'Failed to load contibutors!');
throw err;
}
},
},
issue_template: {
description: 'Generate a .github/ISSUE_TEMPLATE.md file.',
filename: '.github/ISSUE_TEMPLATE.md',
10 changes: 1 addition & 9 deletions src/build_packs/nodejs.js
Original file line number Diff line number Diff line change
@@ -51,10 +51,6 @@ const TESTS = `

const nodejsConfig = {
display: 'Node.js',
lint: {
cmd: 'semistandard',
args: [],
},
test: {
app: {
cmd: 'node',
@@ -118,7 +114,7 @@ const nodejsConfig = {
pkgjson: {
description: 'Generate and/or update a package.json file.',
filename: 'package.json',
addData(data, opts) {
addData(data) {
const json = {};
const origKeys = Object.keys(data.pkgjson);
json.name = data.libPkgName || data.pkgjson.name || 'TODO';
@@ -141,7 +137,6 @@ const nodejsConfig = {
json.main = data.pkgjson.main || 'src/index.js';
_.pull(origKeys, 'main');

_.pull(origKeys, 'contributors');
_.pull(origKeys, 'scripts');
const depRe = /dependencies/i;
const depKeys = origKeys.filter(x => depRe.test(x));
@@ -152,9 +147,6 @@ const nodejsConfig = {
json[key] = data.pkgjson[key];
}

// Put contributors, scripts, and (dev)dependencies at the bottom
data.generate.contributors.addData(data, opts);
json.contributors = data.contributors;
json.scripts = data.pkgjson.scripts || {};
depKeys.sort();
for (const key of depKeys) {
4 changes: 0 additions & 4 deletions src/build_packs/python.js
Original file line number Diff line number Diff line change
@@ -40,10 +40,6 @@ const TESTS = `

const pythonConfig = {
display: 'Python',
lint: {
cmd: 'nox',
args: ['lint'],
},
test: {
app: {
cmd: 'python',
4 changes: 0 additions & 4 deletions src/build_packs/ruby.js
Original file line number Diff line number Diff line change
@@ -38,10 +38,6 @@ module.exports = {
display: 'Ruby',
detect: cwd => fs.statSync(path.join(cwd, 'Gemfile')).isFile(),
load: filename => require(filename),
lint: {
cmd: 'semistandard',
args: [],
},
test: {
app: {
cmd: 'bundle',
Loading