8 Commits
6.2.0 ... 6.2.4

Author SHA1 Message Date
dependabot[bot]
814202780b Bump lodash from 4.17.20 to 4.17.21 (#114)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-12 09:08:43 +02:00
dependabot[bot]
d01995e3b4 Bump ssri from 8.0.0 to 8.0.1 (#111)
Bumps [ssri](https://github.com/npm/ssri) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 13:15:52 +02:00
56de263dce release $npm_package_version 2021-02-19 10:43:49 +01:00
Gabrijel Škoro
0228e7f32c Added support for IE11 (#107) 2021-02-19 10:40:58 +01:00
50216eec3c release $npm_package_version 2021-01-27 16:35:17 +01:00
3e9e988e96 Fixed the return type of getCookieConsentValue in the dts file. 2021-01-27 16:34:57 +01:00
1c6f335500 release $npm_package_version 2020-12-08 18:02:10 +01:00
eb45e7a652 release $npm_package_version 2020-12-06 19:08:02 +01:00
7 changed files with 74 additions and 24 deletions

View File

@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [[6.2.3](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.3)]
- Added support for IE11, the webpack generated runtime-code should not use arrow functions
## [[6.2.2](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.2)]
- Fixed the return type of getCookieConsentValue in the dts file.
## [[6.2.1](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.1)]
Added the `getCookieConsentValue` to the dts file.
## [[6.2.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.0)] ## [[6.2.0](https://github.com/Mastermindzh/react-cookie-consent/releases/tag/6.2.0)]
Added the exported function `getCookieConsentValue` to get the cookie value from custom code Added the exported function `getCookieConsentValue` to get the cookie value from custom code

8
build/index.d.ts vendored
View File

@@ -43,4 +43,12 @@ export interface CookieConsentProps {
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {} export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
/**
* Returns the value of the consent cookie
* Retrieves the regular value first and if not found the legacy one according
* to: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients
* @param {*} name optional name of the cookie
*/
export function getCookieConsentValue(name?: string): string;
export { Cookies }; export { Cookies };

View File

@@ -1,15 +1,25 @@
/*! For license information please see index.js.LICENSE.txt */ /*! For license information please see index.js.LICENSE.txt */
module.exports = (() => { module.exports = (function () {
var e = { var e = {
866: (e, t, n) => { 866: function (e, t, n) {
"use strict"; "use strict";
n.r(t), n.r(t),
n.d(t, { n.d(t, {
Cookies: () => s(), Cookies: function () {
OPTIONS: () => h, return s();
SAME_SITE_OPTIONS: () => m, },
default: () => j, OPTIONS: function () {
getCookieConsentValue: () => g, return h;
},
SAME_SITE_OPTIONS: function () {
return m;
},
default: function () {
return j;
},
getCookieConsentValue: function () {
return g;
},
}); });
const o = require("react"); const o = require("react");
var r = n.n(o), var r = n.n(o),
@@ -509,7 +519,7 @@ module.exports = (() => {
}); });
const j = x; const j = x;
}, },
808: (e, t, n) => { 808: function (e, t, n) {
var o, r, i; var o, r, i;
void 0 === void 0 ===
(r = (r =
@@ -594,7 +604,7 @@ module.exports = (() => {
: o) || (e.exports = r), : o) || (e.exports = r),
(e.exports = i()); (e.exports = i());
}, },
703: (e, t, n) => { 703: function (e, t, n) {
"use strict"; "use strict";
var o = n(414); var o = n(414);
function r() {} function r() {}
@@ -638,10 +648,10 @@ module.exports = (() => {
return (n.PropTypes = n), n; return (n.PropTypes = n), n;
}); });
}, },
697: (e, t, n) => { 697: function (e, t, n) {
e.exports = n(703)(); e.exports = n(703)();
}, },
414: (e) => { 414: function (e) {
"use strict"; "use strict";
e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; e.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
}, },
@@ -653,16 +663,25 @@ module.exports = (() => {
return e[o](r, r.exports, n), r.exports; return e[o](r, r.exports, n), r.exports;
} }
return ( return (
(n.n = (e) => { (n.n = function (e) {
var t = e && e.__esModule ? () => e.default : () => e; var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return n.d(t, { a: t }), t; return n.d(t, { a: t }), t;
}), }),
(n.d = (e, t) => { (n.d = function (e, t) {
for (var o in t) for (var o in t)
n.o(t, o) && !n.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] }); n.o(t, o) && !n.o(e, o) && Object.defineProperty(e, o, { enumerable: !0, get: t[o] });
}), }),
(n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)), (n.o = function (e, t) {
(n.r = (e) => { return Object.prototype.hasOwnProperty.call(e, t);
}),
(n.r = function (e) {
"undefined" != typeof Symbol && "undefined" != typeof Symbol &&
Symbol.toStringTag && Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),

14
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "react-cookie-consent", "name": "react-cookie-consent",
"version": "6.1.0", "version": "6.2.3",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@@ -4204,9 +4204,9 @@
} }
}, },
"lodash": { "lodash": {
"version": "4.17.20", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true "dev": true
}, },
"log-symbols": { "log-symbols": {
@@ -5655,9 +5655,9 @@
} }
}, },
"ssri": { "ssri": {
"version": "8.0.0", "version": "8.0.1",
"resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
"integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"minipass": "^3.1.1" "minipass": "^3.1.1"

View File

@@ -4,7 +4,7 @@
"name": "Rick van Lieshout", "name": "Rick van Lieshout",
"email": "info@rickvanlieshout.com" "email": "info@rickvanlieshout.com"
}, },
"version": "6.1.0", "version": "6.2.3",
"description": "A small, simple and customizable cookie consent bar for use in React applications.", "description": "A small, simple and customizable cookie consent bar for use in React applications.",
"main": "build/index.js", "main": "build/index.js",
"types": "build/index.d.ts", "types": "build/index.d.ts",

8
src/index.d.ts vendored
View File

@@ -43,4 +43,12 @@ export interface CookieConsentProps {
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {} export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
/**
* Returns the value of the consent cookie
* Retrieves the regular value first and if not found the legacy one according
* to: https://web.dev/samesite-cookie-recipes/#handling-incompatible-clients
* @param {*} name optional name of the cookie
*/
export function getCookieConsentValue(name?: string): string;
export { Cookies }; export { Cookies };

View File

@@ -7,6 +7,9 @@ module.exports = {
path: path.resolve(__dirname, "build"), path: path.resolve(__dirname, "build"),
filename: "index.js", filename: "index.js",
libraryTarget: "commonjs2", // THIS IS THE MOST IMPORTANT LINE! :mindblow: I wasted more than 2 days until realize this was the line most important in all this guide. libraryTarget: "commonjs2", // THIS IS THE MOST IMPORTANT LINE! :mindblow: I wasted more than 2 days until realize this was the line most important in all this guide.
environment: {
arrowFunction: false, // the generated runtime-code should not use arrow functions
},
}, },
module: { module: {
rules: [ rules: [