Skip to content

Commit 7570414

Browse files
committed
Stop committing amplitude.js and amplitude.min.js
Github shouldn't be used as a package manager. Use npm or load amplitude dynamically from our CDN using the the snippet. Directly importing amplitude.min.js into your projects can lead to weird double minification bugs if your own project also minifies its code.
1 parent 40ff69f commit 7570414

11 files changed

+219
-6428
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ dist
66
.DS_Store
77
*.crt
88
*.key
9+
amplitude.js
10+
amplitude.min.js
911
amplitude.nocompat.js
1012
amplitude.nocompat.min.js
13+
amplitude-snippet.min.js

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ karma.conf.js
1515
scripts
1616
.npmignore
1717
.jshintrc
18+
amplitude.min.js
19+
amplitude-snippet.min.js

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
### 4.6.0 (February 25, 2018)
1+
### 5.0.0 (February 27, 2019)
2+
3+
* Stop committing generated files to the git repository
4+
* Sync with upstream ua-parser for user agent parsing
5+
* Drop custom user agent parsing for symbian and blackberry
6+
7+
### 4.6.0 (February 25, 2019)
28

39
* Add support for unsetting utm params when a new session is created
410
* Update dependencies to pass yarn audit

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Please see our [installation guide](https://amplitude.zendesk.com/hc/en-us/artic
1111
[![npm version](https://badge.fury.io/js/amplitude-js.svg)](https://badge.fury.io/js/amplitude-js)
1212
[![Bower version](https://badge.fury.io/bo/amplitude-js.svg)](https://badge.fury.io/bo/amplitude-js)
1313

14-
[4.6.0 - Released on February 25, 2019](https://github.com/amplitude/Amplitude-JavaScript/releases/latest)
14+
[5.0.0 - Released on February 27, 2019](https://github.com/amplitude/Amplitude-JavaScript/releases/latest)
1515

1616

1717
# JavaScript SDK Reference #
@@ -25,6 +25,24 @@ See our [JavaScript SDK Reference](https://amplitude.zendesk.com/hc/en-us/articl
2525
# Changelog #
2626
Click [here](https://github.com/amplitude/Amplitude-JavaScript/blob/master/CHANGELOG.md) to view the JavaScript SDK Changelog.
2727

28+
# Upgrading Major Versions and Breaking Changes #
29+
30+
## 5.0
31+
32+
We stopped committing the generated amplitude.min.js and amplitude.js files to
33+
the repository. This should only affect you if you load amplitude via github.
34+
You should use `npm` or `yarn` instead.
35+
36+
We dropped our custom symbian and blackberry user agent parsing to simply match
37+
what the ua-parser-js library does.
38+
39+
## 4.0
40+
41+
The library now defaults to sending requests to https://api.amplitude.com
42+
instead of //api.amplitude.com. This should only affect you if your site does
43+
not use https and you use a Content Security Policy.
44+
45+
2846
# Questions? #
2947
If you have questions about using or installing our JavaScript SDK, you can send an email to [Amplitude Support](mailto:platform@amplitude.com).
3048

amplitude-snippet.min.js

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

amplitude.js

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

amplitude.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "amplitude-js",
33
"author": "Amplitude <support@amplitude.com>",
4-
"version": "4.6.0",
4+
"version": "5.0.0",
55
"license": "MIT",
66
"description": "Javascript library for Amplitude Analytics",
77
"keywords": [
@@ -11,10 +11,10 @@
1111
"repository": "git://github.com/amplitude/amplitude-javascript.git",
1212
"main": "amplitude.js",
1313
"dependencies": {
14+
"@amplitude/ua-parser-js": "0.7.20",
1415
"blueimp-md5": "^2.10.0",
1516
"json3": "^3.3.2",
16-
"query-string": "5",
17-
"@amplitude/ua-parser-js": "0.7.11"
17+
"query-string": "5"
1818
},
1919
"devDependencies": {
2020
"babel-core": "6",
@@ -27,23 +27,24 @@
2727
"fs-extra": "^4.0.2",
2828
"jsdoc": "3.4.0",
2929
"jshint": "^2.9.6",
30-
"karma": "^3.1.3",
30+
"karma": "^4.0.0",
3131
"karma-chai": "^0.1.0",
3232
"karma-chrome-launcher": "^2.2.0",
3333
"karma-firefox-launcher": "^1.0.1",
3434
"karma-mocha": "^1.3.0",
3535
"karma-mocha-reporter": "^2.2.5",
36-
"karma-sauce-launcher": "^1.2.0",
36+
"karma-sauce-launcher": "^2.0.2",
3737
"karma-sinon": "^1.0.5",
3838
"karma-sourcemap-loader": "^0.3.7",
3939
"mocha": "^4.0.1",
4040
"rollup": "^0.56.0",
4141
"rollup-plugin-babel": "^3.0.2",
42-
"rollup-plugin-commonjs": "8",
42+
"rollup-plugin-commonjs": "8.4.1",
4343
"rollup-plugin-legacy": "^1.0.0",
4444
"rollup-plugin-node-resolve": "^3.0.0",
4545
"rollup-plugin-replace": "^2.1.0",
4646
"rollup-plugin-uglify": "^2.0.1",
47+
"saucelabs": "^1.5.0",
4748
"sinon": "^4.1.2",
4849
"uglify-js": "^2.0.0"
4950
},

src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default '4.6.0';
1+
export default '5.0.0';

test/ua-parser.js

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

0 commit comments

Comments
 (0)