Skip to content

Commit 621f012

Browse files
committed
Remove Rhino support
1 parent d18c080 commit 621f012

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+166
-3481
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
node_modules/*
2-
rhino/*
31
templates/default/static/scripts/*
42
test/fixtures/*
53
test/lib/*

.npmignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,4 @@
44
.gitignore
55
.travis.yml
66
gulpfile.js
7-
8-
# scripts for launching JSDoc with Mozilla Rhino
9-
/jsdoc*
10-
!/jsdoc.js
11-
12-
# Rhino and test directories
13-
rhino/
147
test/

LICENSE.md

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,6 @@ Copyright (c) 2011-2015 by the Espree contributors.
145145
The source code for Esprima is available at:
146146
https://github.com/eslint/espree
147147

148-
## events ##
149-
150-
Portions of the events source code are incorporated into the following files:
151-
152-
+ `rhino/events.js`
153-
154-
events is distributed under the MIT license, which is reproduced above.
155-
156-
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
157-
158-
The source code for events is available at:
159-
https://github.com/Gozala/events
160-
161148
## github-flavored-markdown ##
162149

163150
github-flavored-markdown is distributed under the BSD 3-clause license:
@@ -234,36 +221,6 @@ Copyright (c) 2012 Michael Kourlas.
234221
The source code for js2xmlparser is available at:
235222
https://github.com/michaelkourlas/node-js2xmlparser
236223

237-
## Node.js ##
238-
239-
Portions of the Node.js source code are incorporated into the following files:
240-
241-
- `rhino/fs.js`
242-
- `rhino/path.js`
243-
- `rhino/querystring.js`
244-
- `rhino/util.js`
245-
246-
Node.js is distributed under the MIT license, which is reproduced above.
247-
248-
Copyright Joyent, Inc. and other Node contributors. All rights reserved.
249-
250-
The source code for Node.js is available at:
251-
https://github.com/joyent/node
252-
253-
## node-browser-builtins ##
254-
255-
Portions of the node-browser-builtins source code are incorporated into the
256-
following files:
257-
258-
- `rhino/assert.js`
259-
- `rhino/rhino-shim.js`
260-
261-
node-browser-builtins is distributed under the MIT license, which is reproduced
262-
above.
263-
264-
The source code for node-browser-builtins is available at:
265-
https://github.com/alexgorbatchev/node-browser-builtins
266-
267224
## Open Sans ##
268225

269226
Open Sans is distributed under the Apache License 2.0, which is
@@ -284,46 +241,6 @@ Copyright (c) 2012-2013 Johannes Ewald.
284241
The source code for Requizzle is available at:
285242
https://github.com/hegemonic/requizzle
286243

287-
## Rhino ##
288-
289-
Rhino is distributed under the following licenses:
290-
291-
### MPL 2.0 License ###
292-
The majority of the source code for Rhino is available under the Mozilla Public
293-
License (MPL) 2.0, which is included in this distribution.
294-
295-
### License for portions of the Rhino debugger ###
296-
Additionally, some files are available under the BSD 3-clause license:
297-
298-
> Copyright 1997, 1998 Sun Microsystems, Inc. All Rights Reserved.
299-
>
300-
> Redistribution and use in source and binary forms, with or without
301-
> modification, are permitted provided that the following conditions are met:
302-
>
303-
> - Redistributions of source code must retain the above copyright notice,
304-
> this list of conditions and the following disclaimer.
305-
> - Redistributions in binary form must reproduce the above copyright
306-
> notice, this list of conditions and the following disclaimer in the
307-
> documentation and/or other materials provided with the distribution.
308-
> - Neither the name of Sun Microsystems nor the names of its contributors
309-
> may be used to endorse or promote products derived from this software
310-
> without specific prior written permission.
311-
>
312-
> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
313-
> AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
314-
> IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
315-
> DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
316-
> FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
317-
> DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
318-
> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
319-
> CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
320-
> OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
321-
> OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
322-
323-
### Source Code ###
324-
The source code for Rhino is available at:
325-
https://github.com/jsdoc3/rhino
326-
327244
## TaffyDB ##
328245

329246
TaffyDB is distributed under a modified BSD license:

README.md

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,8 @@ Want to contribute to JSDoc? Please read `CONTRIBUTING.md`.
99
Installation and Usage
1010
----------------------
1111

12-
You can run JSDoc on either Node.js or Mozilla Rhino.
13-
14-
### Node.js
15-
16-
Native support for Node.js is available in JSDoc 3.3.0 and later. JSDoc
17-
supports Node.js 0.10 and later.
18-
19-
#### Installing JSDoc for Node.js
20-
21-
You can install JSDoc in your project's `node_modules` folder, or you can
22-
install it globally.
12+
JSDoc supports Node.js 0.10 and later. You can install JSDoc in your project's
13+
`node_modules` folder, or you can install it globally.
2314

2415
To install the latest version available on NPM:
2516

@@ -29,8 +20,6 @@ To install the latest development version:
2920

3021
npm install git+https://github.com/jsdoc3/jsdoc.git
3122

32-
#### Running JSDoc with Node.js
33-
3423
If you installed JSDoc locally, the JSDoc command-line tool is available in
3524
`./node_modules/.bin`. To generate documentation for the file
3625
`yourJavaScriptFile.js`:
@@ -46,47 +35,6 @@ can use the `--destination` (`-d`) option to specify another directory.
4635

4736
Run `jsdoc --help` for a complete list of command-line options.
4837

49-
### Mozilla Rhino
50-
51-
All versions of JSDoc 3 run on a customized version of Mozilla Rhino, which
52-
requires Java. You can run JSDoc 3 on Java 1.6 and later.
53-
54-
#### Installing JSDoc for Mozilla Rhino
55-
56-
To install JSDoc, download a .zip file for the
57-
[latest development version](https://github.com/jsdoc3/jsdoc/archive/master.zip)
58-
or a [previous release](https://github.com/jsdoc3/jsdoc/tags).
59-
60-
You can also use git to clone the
61-
[JSDoc repository](https://github.com/jsdoc3/jsdoc):
62-
63-
git clone git+https://github.com/jsdoc3/jsdoc.git
64-
65-
The JSDoc repository includes a
66-
[customized version of Mozilla Rhino](https://github.com/jsdoc3/rhino). Make
67-
sure your Java classpath does not include any other versions of Rhino. (On OS X,
68-
you may need to remove the file `~/Library/Java/Extensions/js.jar`.)
69-
70-
**Note**: In JSDoc 3.3.0 and later, if you need to run JSDoc on Mozilla Rhino,
71-
do not install JSDoc with npm. Use one of the methods described above.
72-
73-
#### Running JSDoc with Mozilla Rhino
74-
75-
On OS X, Linux, and other POSIX systems, to generate documentation for the file
76-
`yourJavaScriptFile.js`:
77-
78-
./jsdoc yourJavaScriptFile.js
79-
80-
Or on Windows:
81-
82-
jsdoc yourJavaScriptFile.js
83-
84-
By default, the generated documentation is saved in a directory named `out`. You
85-
can use the `--destination` (`-d`) option to specify another directory.
86-
87-
Run `jsdoc --help` for a complete list of command-line options.
88-
89-
9038
Templates and Build Tools
9139
-------------------------
9240

cli.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
* A few critical notes for anyone who works on this module:
77
*
88
* + The module should really export an instance of `cli`, and `props` should be properties of a
9-
* `cli` instance. However, Rhino interpreted `this` as a reference to `global` within the
10-
* prototype's methods, so we couldn't do that.
11-
* + On Rhino, for unknown reasons, the `jsdoc/fs` and `jsdoc/path` modules can fail in some cases
12-
* when they are required by this module. You may need to use `fs` and `path` instead.
9+
* `cli` instance.
1310
*
1411
* @private
1512
*/

gulpfile.js

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,7 @@ var options = {
3131
'test/specs/**/*.js'
3232
],
3333
nodeBin: path.resolve(__dirname, './jsdoc.js'),
34-
nodePath: process.execPath,
35-
rhinoBin: (function() {
36-
var filepath = path.resolve(__dirname, './jsdoc');
37-
38-
if (os.platform().indexOf('win') === 0) {
39-
filepath += '.cmd';
40-
}
41-
42-
return filepath;
43-
})()
34+
nodePath: process.execPath
4435
};
4536

4637
gulp.task('bump', function() {
@@ -63,20 +54,9 @@ gulp.task('lint', function() {
6354
.pipe(eslint.failOnError());
6455
});
6556

66-
gulp.task('test-node', function(cb) {
57+
gulp.task('test', function(cb) {
6758
var cmd = util.format('%s "%s" -T', options.nodePath, options.nodeBin);
6859
exec(cmd, execCb.bind(null, cb));
6960
});
7061

71-
gulp.task('test-rhino', function(cb) {
72-
var cmd = util.format('"%s" -T -q "parser=rhino"', options.rhinoBin);
73-
exec(cmd, execCb.bind(null, cb));
74-
});
75-
76-
gulp.task('test-rhino-jsparser', function(cb) {
77-
var cmd = util.format('"%s" -T -q "parser=js"', options.rhinoBin);
78-
exec(cmd, execCb.bind(null, cb));
79-
});
80-
81-
gulp.task('test', ['test-node', 'test-rhino', 'test-rhino-jsparser']);
8262
gulp.task('default', ['lint', 'test']);

jsdoc

Lines changed: 0 additions & 33 deletions
This file was deleted.

jsdoc.cmd

Lines changed: 0 additions & 26 deletions
This file was deleted.

jsdoc.js

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,7 @@
4545
*/
4646
global.env = (function() {
4747
'use strict';
48-
49-
// This bit of joy is here because Rhino treats `./lib/jsdoc/env` and `jsdoc/env` as separate
50-
// modules. In contrast, Node.js errors out on `jsdoc/env` because we don't patch `require()`
51-
// until after this file is loaded.
52-
if (require('./lib/jsdoc/util/runtime').isRhino()) {
53-
return require('jsdoc/env');
54-
}
55-
else {
56-
return require('./lib/jsdoc/env');
57-
}
48+
return require('./lib/jsdoc/env');
5849
})();
5950

6051
/**
@@ -67,14 +58,7 @@ global.env = (function() {
6758
*/
6859
global.app = (function() {
6960
'use strict';
70-
71-
// See comment in `global.env` to find out why we jump through this hoop.
72-
if (require('./lib/jsdoc/util/runtime').isRhino()) {
73-
return require('jsdoc/app');
74-
}
75-
else {
76-
return require('./lib/jsdoc/app');
77-
}
61+
return require('./lib/jsdoc/app');
7862
})();
7963

8064
(function() {
@@ -102,8 +86,7 @@ global.app = (function() {
10286
if (env.opts.debug) {
10387
/**
10488
* Recursively print an object's properties to stdout. This method is safe to use with
105-
* objects that contain circular references. In addition, on Mozilla Rhino, this method is
106-
* safe to use with native Java objects.
89+
* objects that contain circular references.
10790
*
10891
* This method is available only when JSDoc is run with the `--debug` option.
10992
*
@@ -117,21 +100,5 @@ global.app = (function() {
117100
};
118101
}
119102

120-
// On Rhino, we use a try/catch block so we can log the Java exception (if available)
121-
if ( runtime.isRhino() ) {
122-
try {
123-
cli.runCommand(cb);
124-
}
125-
catch (e) {
126-
if (e.rhinoException) {
127-
logger.fatal( e.rhinoException.printStackTrace() );
128-
} else {
129-
console.trace(e);
130-
cli.exit(1);
131-
}
132-
}
133-
}
134-
else {
135-
cli.runCommand(cb);
136-
}
103+
cli.runCommand(cb);
137104
})();

lib/jsdoc/opts/args.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function parseQuery(str) {
2424
argParser.addOption('a', 'access', true, 'Only display symbols with the given access: "public", "protected", "private" or "undefined", or "all" for all access levels. Default: all except "private"', true);
2525
argParser.addOption('c', 'configure', true, 'The path to the configuration file. Default: path/to/jsdoc/conf.json');
2626
argParser.addOption('d', 'destination', true, 'The path to the output folder. Use "console" to dump data to the console. Default: ./out/');
27-
argParser.addOption('', 'debug', false, 'Log information for debugging JSDoc. On Rhino, launches the debugger when passed as the first option.');
27+
argParser.addOption('', 'debug', false, 'Log information for debugging JSDoc.');
2828
argParser.addOption('e', 'encoding', true, 'Assume this encoding when reading all source files. Default: utf8');
2929
argParser.addOption('h', 'help', false, 'Print this message and quit.');
3030
argParser.addOption('', 'match', true, 'When running tests, only use specs whose names contain <value>.', true);

0 commit comments

Comments
 (0)