Skip to content

Commit 3423d73

Browse files
mocca102jjl014
andauthored
Add events polyfill (#277)
* Add events polyfill * Move events to utils * Remove events package * Disable cspell for events util * Add browserify/events distributable output --------- Co-authored-by: Jimmy Li <[email protected]>
1 parent 6ca0423 commit 3423d73

File tree

6 files changed

+505
-31
lines changed

6 files changed

+505
-31
lines changed

bundle.js

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const banner = `/*!
77
* Constructor Search uses artificial intelligence to provide AI-first search, browse, and recommendations results that increase conversions and revenue.
88
* - https://constructor.io
99
* - https://github.com/Constructor-io/constructorio-client-javascript
10+
* ---
11+
* Includes code from the 'browserify/events' library, licensed under the MIT License.
12+
* For full license details, see the library documentation.
1013
*
1114
*/`;
1215

cspell.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"lib",
1212
"docs",
1313
"dist",
14-
"test/utils/botlist.js"
14+
"test/utils/botlist.js",
15+
"src/utils/events.js"
1516
],
1617
// flagWords - list of words to be always considered incorrect
1718
// This is useful for offensive words and common spelling errors.

package-lock.json

-27
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"@babel/preset-env": "^7.15.8",
4949
"@babel/register": "^7.15.3",
5050
"@cspell/eslint-plugin": "^6.8.2",
51-
"@types/events": "^3.0.0",
5251
"@typescript-eslint/eslint-plugin": "^5.48.1",
5352
"@typescript-eslint/parser": "^5.48.1",
5453
"chai": "^4.2.0",
@@ -74,7 +73,6 @@
7473
"dependencies": {
7574
"@constructor-io/constructorio-id": "^2.4.10",
7675
"crc-32": "^1.2.2",
77-
"events": "^3.0.0",
7876
"fetch-ponyfill": "^7.1.0",
7977
"store2": "^2.14.2"
8078
},

src/modules/tracker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable object-curly-newline, no-underscore-dangle, camelcase, no-unneeded-ternary */
2-
const EventEmitter = require('events');
2+
const EventEmitter = require('../utils/events');
33
const helpers = require('../utils/helpers');
44
const RequestQueue = require('../utils/request-queue');
55

0 commit comments

Comments
 (0)