Skip to content

Commit bc30018

Browse files
authored
Merge pull request #42 from adjust/v531
Version 5.3.1
2 parents 6fa02dc + 2680ffa commit bc30018

40 files changed

+16673
-23827
lines changed

.babelrc

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,21 @@
22
"presets": [
33
"@babel/preset-flow",
44
["@babel/preset-env", {
5-
"targets": ["> 0.25%", "not dead"]
5+
"targets": ">0.25%, not dead, ie 11"
66
}]
77
],
88
"plugins": [
99
"es6-promise",
1010
"@babel/plugin-transform-flow-comments",
11-
["@babel/plugin-transform-runtime", {
12-
"version": "7.6.2"
13-
}]
11+
"@babel/plugin-transform-runtime"
1412
],
15-
"env": {
16-
"test": {
17-
"plugins": ["transform-es2015-modules-commonjs"]
18-
}
19-
},
2013
"overrides": [
2114
{
2215
"test": ["./src/**/*.ts"],
2316
"presets": [
2417
"@babel/preset-typescript",
2518
["@babel/preset-env", {
26-
"targets": ["> 0.25%", "not dead"]
19+
"targets": ">0.25%, not dead, ie 11"
2720
}]
2821
],
2922
"plugins": [

.eslintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"node": true,
55
"jest": true
66
},
7-
"parser": "babel-eslint",
7+
"parser": "@babel/eslint-parser",
88
"parserOptions": {
99
"ecmaVersion": 6,
1010
"sourceType": "module"
@@ -66,7 +66,8 @@
6666
"jest/no-disabled-tests": "error",
6767
"jest/no-focused-tests": "error",
6868
"jest/no-identical-title": "error",
69-
"@typescript-eslint/no-var-requires": "off"
69+
"@typescript-eslint/no-var-requires": "off",
70+
"jest/prefer-to-be": "warn"
7071
}
7172
}
7273
]

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
1-
### Version 5.3.0 (25th March 2021)
1+
### Version 5.3.1 (8st August 2022)
2+
#### Added
3+
- Added sending of `deduplication_id` parameter in `event` package.
4+
- Added SRI feature support.
5+
6+
#### Fixed
7+
- Updated deprecated and vulnerable dependencies.
8+
9+
---
10+
### Version 5.3.0 (25th March 2022)
211
#### Added
312
- Added `getWebUUID` method to access SDK generated ID `web_uuid`.
413
- Added `getAttribution` method to access user's current attribution information.

Jenkinsfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!groovy
22

33
pipeline {
4+
tools {
5+
nodejs 'nodejs_14.20.0'
6+
}
47
agent {
58
node {
69
label 'new'

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,20 @@ Our sdk is exposed under all module definitions, so it works under CommonJS and
3131
To lazy <a id="loading-snippet">load the Adjust Web SDK through CDN</a> paste the following snippet into the `<head>` tag:
3232
```html
3333
<script type="application/javascript">
34-
!function(t,a,e,r,s,n,l,d,o){t.Adjust=t.Adjust||{},t.Adjust_q=t.Adjust_q||[];for(var c=0;c<n.length;c++)l(t.Adjust,t.Adjust_q,n[c]);d=a.createElement("script"),o=a.getElementsByTagName("script")[0],d.async=!0,d.src="https://cdn.adjust.com/adjust-latest.min.js",d.onload=function(){for(var a=0;a<t.Adjust_q.length;a++)t.Adjust[t.Adjust_q[a][0]].apply(t.Adjust,t.Adjust_q[a][1]);t.Adjust_q=[]},o.parentNode.insertBefore(d,o)}(window,document,0,0,0,["initSdk","trackEvent","addGlobalCallbackParameters","addGlobalPartnerParameters","removeGlobalCallbackParameter","removeGlobalPartnerParameter","clearGlobalCallbackParameters","clearGlobalPartnerParameters","switchToOfflineMode","switchBackToOnlineMode","stop","restart","gdprForgetMe","disableThirdPartySharing","initSmartBanner"],function(t,a,e){t[e]=function(){a.push([e,arguments])}});
34+
!function(t,a,e,r,n,s,l,d,o,i,u){t.Adjust=t.Adjust||{},t.Adjust_q=t.Adjust_q||[];for(var c=0;c<d.length;c++)o(t.Adjust,t.Adjust_q,d[c]);i=a.createElement(e),u=a.getElementsByTagName(e)[0],i.async=!0,i.src="https://cdn.adjust.com/adjust-latest.min.js",i.onload=function(){for(var a=0;a<t.Adjust_q.length;a++)t.Adjust[t.Adjust_q[a][0]].apply(t.Adjust,t.Adjust_q[a][1]);t.Adjust_q=[]},u.parentNode.insertBefore(i,u)}(window,document,"script",0,0,0,0,["initSdk","getAttribution","getWebUUID","trackEvent","addGlobalCallbackParameters","addGlobalPartnerParameters","removeGlobalCallbackParameter","removeGlobalPartnerParameter","clearGlobalCallbackParameters","clearGlobalPartnerParameters","switchToOfflineMode","switchBackToOnlineMode","stop","restart","gdprForgetMe","disableThirdPartySharing","initSmartBanner"],(function(t,a,e){t[e]=function(){a.push([e,arguments])}}));
3535
</script>
3636
```
3737

3838
The Adjust Web SDK should be loaded only once per page and it should be initiated once per page load.
3939

40-
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-5.3.0.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
40+
When loading the sdk through CDN we suggest using minified version. You can target specific version like `https://cdn.adjust.com/adjust-5.3.1.min.js`, or you can target latest version `https://cdn.adjust.com/adjust-latest.min.js` if you want automatic updates without need to change the target file. The sdk files are cached so they are served as fast as possible, and the cache is refreshed every half an hour. If you want updates immediately make sure to target specific version.
41+
42+
You may want to use [Subresource Integrity (SRI)](sri-mdn) feature to mitigate XSS attacks risk. In this case you could use the loading snippet that enables SRI check instructing browser to validate the script before running it:
43+
```html
44+
<script type="application/javascript">
45+
!function(t,a,e,r,n,o,s,l,d,i,u){t.Adjust=t.Adjust||{},t.Adjust_q=t.Adjust_q||[];for(var c=0;c<l.length;c++)d(t.Adjust,t.Adjust_q,l[c]);i=a.createElement(e),u=a.getElementsByTagName(e)[0],i.async=!0,i.src="https://cdn.adjust.com/adjust-latest.min.js",i.crossorigin="anonymous",i.integrity=o,i.onload=function(){for(var a=0;a<t.Adjust_q.length;a++)t.Adjust[t.Adjust_q[a][0]].apply(t.Adjust,t.Adjust_q[a][1]);t.Adjust_q=[]},u.parentNode.insertBefore(i,u)}(window,document,"script",0,0,"sha384-CjBQNn/4oEjO+JooquiRlZogj8ajC3b2XT5jnXwz53eE4KtewkHjdo6s9Fy4FK2a",0,["initSdk","getAttribution","getWebUUID","trackEvent","addGlobalCallbackParameters","addGlobalPartnerParameters","removeGlobalCallbackParameter","removeGlobalPartnerParameter","clearGlobalCallbackParameters","clearGlobalPartnerParameters","switchToOfflineMode","switchBackToOnlineMode","stop","restart","gdprForgetMe","disableThirdPartySharing","initSmartBanner"],(function(t,a,e){t[e]=function(){a.push([e,arguments])}}));
46+
</script>
47+
```
4148

4249
It's also possible to install our sdk through NPM:
4350

@@ -443,6 +450,7 @@ SOFTWARE.
443450
[adjust.com]: https://adjust.com
444451
[dashboard]: https://adjust.com
445452
[example-app]: src/demo.html
453+
[sri-mdn]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
446454

447455
[callbacks-guide]: https://help.adjust.com/manage-data/raw-data-exports/callbacks
448456
[special-partners]: https://help.adjust.com/dashboard/integrated-partners

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.0
1+
5.3.1

dist/INTEGRITY

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sha384-CjBQNn/4oEjO+JooquiRlZogj8ajC3b2XT5jnXwz53eE4KtewkHjdo6s9Fy4FK2a

0 commit comments

Comments
 (0)