Skip to content
This repository was archived by the owner on Jan 31, 2020. 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: mongodb-js/fmt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: dd44e3ddd6a287d81301a3a9099159bd4c836a92
Choose a base ref
...
head repository: mongodb-js/fmt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c6eb1124758e0b35ba7a3fe8b63ef943b61f46b1
Choose a head ref
  • 7 commits
  • 8 files changed
  • 4 contributors

Commits on Oct 19, 2015

  1. 👕

    imlucas committed Oct 19, 2015

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    d26536f View commit details

Commits on Oct 26, 2015

  1. 💚

    imlucas committed Oct 26, 2015
    Copy the full SHA
    453ab45 View commit details

Commits on Jun 9, 2016

  1. Copy the full SHA
    da67a88 View commit details

Commits on Jun 20, 2016

  1. Copy the full SHA
    244ded0 View commit details

Commits on Nov 26, 2016

  1. Copy the full SHA
    2376730 View commit details

Commits on Jan 15, 2019

  1. Sunsetting this project

    imlucas committed Jan 15, 2019
    Copy the full SHA
    4045480 View commit details
  2. 0.0.4

    imlucas committed Jan 15, 2019
    Copy the full SHA
    c6eb112 View commit details
Showing with 47 additions and 249 deletions.
  1. +2 −8 .travis.yml
  2. +25 −0 README.md
  3. +12 −45 bin/mongodb-js-fmt.js
  4. +3 −1 index.js
  5. +0 −135 lib/index.js
  6. +5 −51 package.json
  7. +0 −8 test/index.test.js
  8. +0 −1 test/mocha.opts
10 changes: 2 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
language: node_js
sudo: false
node_js:
- 'iojs'
- 'node'
- '0.10'
script: npm run ci
cache:
directories:
- node_modules
- 4
script: echo "Sunset"
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# :wave: Sunset

If you're seeing this message, it's because your module is still using `mongodb-js-fmt` which has been sunset. This project has been hanging around for far too long... `jsfmt` has long been replaced by `prettier` and editor's are now completely different. It no longer is, it was. :)

`mongodb-js-fmt` never even made it to a minor release, but it snuck into lots of project templates so I'm including this message to help cleanup.


Here's how to make this go away:

1. Remove `"fmt": "mongodb-js-fmt"` from `"scripts"` in your package.json
2. `npm uninstall --save-dev mongodb-js-fmt`
3. Install [prettier for the IDE/Editor of your choice](https://prettier.io/docs/en/editors.html)
4. If you see `"mongodb-js-fmt": "0.0.3"` in a friend's `package.json`, send them a PR or this link https://github.com/mongodb-js/fmt

## Why?

This project has been hanging around for far too long... `jsfmt` has long been replaced by `prettier` and editor's are now completely different.

Install [prettier for the IDE/Editor of your choice](https://prettier.io/docs/en/editors.html).

The README below is preserved for future travelers.

---


# mongodb-js-fmt [![travis][travis_img]][travis_url] [![npm][npm_img]][npm_url]

> Automatically rewrites [our code][mongodb-js] to [a shared spec][styleguide] because style is for tailors.
57 changes: 12 additions & 45 deletions bin/mongodb-js-fmt.js
Original file line number Diff line number Diff line change
@@ -1,50 +1,17 @@
#!/usr/bin/env node

/* eslint no-sync:0 */
var path = require('path');
var fs = require('fs');
var chalk = require('chalk');
var figures = require('figures');
var format = require('util').format;
console.error('⚠ mongodb-js-fmt has been sunset!');
console.error(' Please read: https://github.com/mongodb-js/fmt');
console.error(`
---
If you're seeing this message, it's because your module is still using 'mongodb-js-fmt' which has been sunset. It no longer is, it was. :)
var usage = fs.readFileSync(path.resolve(__dirname, '../usage.txt')).toString();
var args = require('minimist')(process.argv.slice(2), {
boolean: ['debug', 'dry', 'json']
});
mongodb-js-fmt never even made it to a minor release, but it snuck into lots of project templates so I'm including this message to help cleanup.
if (args.debug) {
process.env.DEBUG = 'mongodb-js-fmt';
}
var fmt = require('../');
var pkg = require('../package.json');
Here's how to make this go away:
args.globs = args._;


if (args.help || args.h) {
console.error(usage);
process.exit(1);
}
if (args.version) {
console.error(pkg.version);
process.exit(1);
}

fmt(args, function(err, res) {
if (err) {
if (args.json) {
err = JSON.stringify(err, null, 2);
}
console.error(chalk.red(figures.cross), err.message);
console.error(chalk.gray(err.stack));
process.exit(1);
return;
}
if (args.json) {
console.log(JSON.stringify(res, null, 2));
} else {
console.log(chalk.green(figures.tick),
format('formatted (%d), unchanged (%d)',
res.formatted.length, res.unchanged.length));
}
});
1. Remove \`"fmt": "mongodb-js-fmt"\` from \`"scripts"\` in your package.json
2. npm uninstall --save-dev mongodb-js-fmt
3. Install prettier for the IDE/Editor of your choice: https://prettier.io/docs/en/editors.html
4. If you see \`"mongodb-js-fmt": "0.0.3"\` in a friend's \`package.json\`, send them a PR or this link https://github.com/mongodb-js/fmt
`);
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
module.exports = require('./lib');
module.exports = function(opts, done) {
throw new Error('Project sunsetted');
};
135 changes: 0 additions & 135 deletions lib/index.js

This file was deleted.

56 changes: 5 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,15 @@
{
"name": "mongodb-js-fmt",
"description": "Automatically rewrites our code to a shared spec because style is for tailors.",
"version": "0.0.3",
"scripts": {
"check": "mongodb-js-precommit",
"fmt": "node bin/mongodb-js-fmt.js --dry",
"test": "mocha",
"ci": "npm run check && npm test"
},
"version": "0.0.4",
"bin": {
"mongodb-js-fmt": "bin/mongodb-js-fmt.js"
},
"homepage": "http://mongodb-js.github.io/mongodb-js-fmt",
"homepage": "https://github.com/mongodb-js/fmt",
"repository": {
"type": "git",
"url": "git://github.com/mongodb-js/mongodb-js-fmt.git"
},
"dependencies": {
"async": "^1.4.2",
"chalk": "^1.1.1",
"debug": "^2.2.0",
"esformatter-braces": "^1.2.1",
"esformatter-dot-notation": "^1.3.1",
"esformatter-eol-last": "^1.0.0",
"esformatter-parseint": "^1.0.3",
"esformatter-quote-props": "^1.0.2",
"esformatter-quotes": "^1.0.3",
"esformatter-remove-trailing-commas": "^1.0.1",
"esformatter-semicolons": "^1.1.1",
"esformatter-spaced-lined-comment": "^2.0.1",
"esformatter-var-each": "^2.1.0",
"figures": "^1.4.0",
"glob": "^5.0.14",
"jsfmt": "^0.5.0",
"lodash.defaults": "^3.1.2",
"lodash.uniq": "^3.2.2",
"minimist": "^1.2.0"
},
"devDependencies": {
"eslint-config-mongodb-js": "^0.1.6",
"mocha": "^2.3.3",
"pre-commit": "^1.1.1"
"url": "git://github.com/mongodb-js/fmt.git"
},
"license": "Apache 2",
"precommit": "check",
"dependency-check": {
"ignore": [
"esformatter-braces",
"esformatter-dot-notation",
"esformatter-eol-last",
"esformatter-parseint",
"esformatter-quote-props",
"esformatter-quotes",
"esformatter-remove-trailing-commas",
"esformatter-semicolons",
"esformatter-spaced-lined-comment",
"esformatter-var-each"
]
}
"dependencies": {},
"license": "Apache 2"
}
8 changes: 0 additions & 8 deletions test/index.test.js

This file was deleted.

1 change: 0 additions & 1 deletion test/mocha.opts

This file was deleted.