Skip to content

Commit 011637b

Browse files
rtsaogerardobort
authored andcommitted
refactor(*): remove need for regenerator runtime
1 parent ec098c2 commit 011637b

File tree

8 files changed

+67
-74
lines changed

8 files changed

+67
-74
lines changed

examples/runkit.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// requires ployfill for ES7 async/await
2-
require("babel-polyfill");
3-
41
const corenlp = require("corenlp");
52
const CoreNLP = corenlp.default; // convenient when not using `import`
63

package-lock.json

Lines changed: 37 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"prepublish": "npm run lint && npm run test && npm run compile",
1313
"lint": "eslint 'src/**/*.js' 'test/*.js'",
1414
"lint:fix": "npm run lint -- --fix",
15-
"test": "nyc --reporter=html --reporter=text mocha --require babel-polyfill test/setup.js --sort 'src/**/*.spec.js' --compilers js:babel-core/register --timeout 30000",
15+
"test": "nyc --reporter=html --reporter=text mocha test/setup.js --sort 'src/**/*.spec.js' --compilers js:babel-core/register --timeout 30000",
1616
"test:watch": "npm run test -- --watch",
1717
"doc": "DEBUG=gulp-jsdoc3 gulp doc"
1818
},
@@ -41,28 +41,44 @@
4141
},
4242
"homepage": "https://github.com/gerardobort/node-corenlp#readme",
4343
"runkitExampleFilename": "examples/runkit.js",
44+
"engines": {
45+
"node": ">= 6"
46+
},
4447
"babel": {
4548
"plugins": [
46-
"transform-object-rest-spread"
49+
"transform-object-rest-spread",
50+
[
51+
"fast-async",
52+
{
53+
"spec": true
54+
}
55+
]
4756
],
4857
"presets": [
49-
"es2015",
50-
"es2017"
58+
[
59+
"env",
60+
{
61+
"targets": {
62+
"node": "6"
63+
},
64+
"exclude": [
65+
"transform-regenerator"
66+
]
67+
}
68+
]
5169
]
5270
},
5371
"devDependencies": {
5472
"babel-core": "^6.25.0",
5573
"babel-plugin-transform-object-rest-spread": "^6.26.0",
56-
"babel-polyfill": "^6.23.0",
57-
"babel-preset-env": "^1.6.0",
58-
"babel-preset-es2015": "^6.24.1",
59-
"babel-preset-es2017": "^6.24.1",
74+
"babel-preset-env": "^1.6.1",
6075
"chai": "^4.1.1",
6176
"cz-conventional-changelog": "^2.0.0",
6277
"docdash": "^0.4.0",
6378
"eslint": "^4.5.0",
6479
"eslint-config-airbnb-base": "^11.3.1",
6580
"eslint-plugin-import": "^2.7.0",
81+
"fast-async": "^6.3.0",
6682
"gulp": "^3.9.1",
6783
"gulp-babel": "^7.0.0",
6884
"gulp-clean": "^0.3.2",

src/connector/connector-server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class ConnectorServer {
4444
* The conenctor should support extensibility to special tools:
4545
* - For example, Semgrex is an utility that runs in a separate url Hanlder
4646
* in StanfordCoreNLPServer
47-
* This url is /semgrex, and apart of the normal options, it expects the
48-
* query-string `pattern` as a must. This `pattern` option is taken here from
47+
* This url is /semgrex, and apart of the normal options, it expects the
48+
* query-string `pattern` as a must. This `pattern` option is taken here from
4949
* the options object, form the key `semgrex.pattern`.
5050
*/
5151
if (utility) {

src/simple/annotator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ class Annotator {
8686
}
8787

8888
/**
89-
* Get an object of all the Annotator options including the current and all its
89+
* Get an object of all the Annotator options including the current and all its
9090
* dependencies, prefixed by the annotator names
9191
* This is useful to fulfill the options params in CoreNLP API properties.
9292
* @return {Array.<string>} pipelineOptions

src/simple/document.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Document extends Annotable {
5555

5656
/**
5757
* @todo Missing implementation
58-
* @requires {Promise<DeterministicCorefAnnotator>} dcoref
58+
* @requires {Promise<DeterministicCorefAnnotator>} dcoref
5959
* @see https://stanfordnlp.github.io/CoreNLP/dcoref.html
6060
* @returns {undefined}
6161
*/

src/simple/governor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Governor {
7373

7474
/**
7575
* Get an instance of Governor from a given JSON
76-
*
76+
*
7777
* @todo It is not possible to properly generate a Governor from a GovernorJSON
7878
* the Governor requires references to the Token instances in order to work
7979
* @param {GovernorJSON} data - The token data, as returned by CoreNLP API service

src/simple/token.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Annotable from './annotable';
2222
* by language provided by this library. It's only helpful for analysis and study. The
2323
* data was collected from different documentation resources on the Web.
2424
* The PosInfo may vary depending on the POS annotation types used, for example, CoreNLP
25-
* for Spanish uses custom POS tags developed by Stanford, but this can also be changed
25+
* for Spanish uses custom POS tags developed by Stanford, but this can also be changed
2626
* to Universal Dependencies, which uses different tags.
2727
* @property {string} group
2828
* @property {string} tag

0 commit comments

Comments
 (0)