Compare commits

..

2 Commits

Author SHA1 Message Date
Pdn Technology
2fa105ac1a index.d.ts bugfix
Some checks failed
CI / test (20) (push) Has been cancelled
CI / test (22) (push) Has been cancelled
2026-06-20 09:20:23 +03:00
Pdn Technology
0370178cd7 1.1.2 2026-06-20 09:10:00 +03:00
4 changed files with 30 additions and 9 deletions

View File

@ -2,6 +2,12 @@
All notable changes to this project are documented in this file. All notable changes to this project are documented in this file.
## [1.1.3] - 2026-06-20
### Fixed
- TypeScript declaration for `defaultConfig` (`export const`, not `export function`)
## [1.1.0] - 2026-06-20 ## [1.1.0] - 2026-06-20
### Added ### Added

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@pdntechnology/cookie-consent", "name": "@pdntechnology/cookie-consent",
"version": "1.1.1", "version": "1.1.2",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@pdntechnology/cookie-consent", "name": "@pdntechnology/cookie-consent",
"version": "1.1.0", "version": "1.1.2",
"license": "MIT", "license": "MIT",
"devDependencies": { "devDependencies": {
"vitest": "^3.2.4" "vitest": "^3.2.4"

View File

@ -1,12 +1,14 @@
{ {
"name": "@pdntechnology/cookie-consent", "name": "@pdntechnology/cookie-consent",
"version": "1.1.1", "version": "1.1.3",
"description": "Lightweight Google Consent Mode v2 CMP for React and Next.js", "description": "Lightweight Google Consent Mode v2 CMP for React and Next.js",
"type": "module", "type": "module",
"main": "./src/index.js", "main": "./src/index.js",
"module": "./src/index.js", "module": "./src/index.js",
"types": "./src/index.d.ts", "types": "./src/index.d.ts",
"sideEffects": ["./src/styles.css"], "sideEffects": [
"./src/styles.css"
],
"exports": { "exports": {
".": { ".": {
"types": "./src/index.d.ts", "types": "./src/index.d.ts",
@ -20,7 +22,14 @@
}, },
"./styles.css": "./src/styles.css" "./styles.css": "./src/styles.css"
}, },
"files": ["src", "README.md", "README.tr.md", "LICENSE", "CHANGELOG.md", "CONTRIBUTING.md"], "files": [
"src",
"README.md",
"README.tr.md",
"LICENSE",
"CHANGELOG.md",
"CONTRIBUTING.md"
],
"scripts": { "scripts": {
"test": "vitest run", "test": "vitest run",
"test:watch": "vitest", "test:watch": "vitest",
@ -32,9 +41,15 @@
"react-dom": ">=18.0.0" "react-dom": ">=18.0.0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"next": { "optional": true }, "next": {
"react": { "optional": true }, "optional": true
"react-dom": { "optional": true } },
"react": {
"optional": true
},
"react-dom": {
"optional": true
}
}, },
"devDependencies": { "devDependencies": {
"vitest": "^3.2.4" "vitest": "^3.2.4"

2
src/index.d.ts vendored
View File

@ -44,7 +44,7 @@ export const GOOGLE_CONSENT_SIGNALS: readonly string[];
export function configureConsent(config?: ConsentConfig): ConsentConfig; export function configureConsent(config?: ConsentConfig): ConsentConfig;
export function getConsentConfig(): ConsentConfig; export function getConsentConfig(): ConsentConfig;
export function defaultConfig: ConsentConfig; export const defaultConfig: ConsentConfig;
export function getConsent(): UserConsent | null; export function getConsent(): UserConsent | null;
export function setConsent(preferences: Partial<UserConsent>): PersistResult; export function setConsent(preferences: Partial<UserConsent>): PersistResult;