Skip to content
This repository has been archived by the owner on Nov 21, 2022. It is now read-only.

Commit

Permalink
chore: update all deps
Browse files Browse the repository at this point in the history
  • Loading branch information
preventdefault committed Jun 5, 2020
1 parent 4511967 commit c4acbda
Show file tree
Hide file tree
Showing 27 changed files with 3,255 additions and 1,040 deletions.
4,140 changes: 3,157 additions & 983 deletions package-lock.json

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,30 @@
},
"license": "MIT",
"devDependencies": {
"@babel/preset-react": "7.9.4",
"@rollup/plugin-commonjs": "11.1.0",
"@babel/preset-react": "7.10.1",
"@rollup/plugin-commonjs": "13.0.0",
"@semantic-release/changelog": "5.0.1",
"@semantic-release/git": "9.0.0",
"@spring-media/storybook-addon-image-snapshots": "0.10.3",
"@storybook/addon-docs": "5.3.18",
"@storybook/addon-knobs": "5.3.18",
"@storybook/addon-viewport": "5.3.18",
"@storybook/storybook-deployer": "2.8.5",
"@storybook/vue": "5.3.18",
"@types/jest": "25.2.1",
"@types/node": "13.13.5",
"@typescript-eslint/eslint-plugin": "2.32.0",
"@typescript-eslint/parser": "2.32.0",
"@storybook/addon-docs": "5.3.19",
"@storybook/addon-knobs": "5.3.19",
"@storybook/addon-viewport": "5.3.19",
"@storybook/storybook-deployer": "2.8.6",
"@storybook/vue": "5.3.19",
"@types/jest": "25.2.3",
"@types/node": "14.0.11",
"@typescript-eslint/eslint-plugin": "3.1.0",
"@typescript-eslint/parser": "3.1.0",
"@vue/eslint-config-typescript": "5.0.2",
"@vue/test-utils": "1.0.2",
"@vue/test-utils": "1.0.3",
"babel-jest": "26.0.1",
"babel-loader": "8.1.0",
"babel-preset-vue": "2.0.2",
"chalk": "4.0.0",
"clean-css": "4.2.3",
"codeceptjs": "2.6.4",
"es-check": "5.1.0",
"eslint": "7.0.0",
"eslint": "7.1.0",
"eslint-config-prettier": "6.11.0",
"eslint-plugin-prettier": "3.1.3",
"eslint-plugin-vue": "6.2.2",
Expand All @@ -90,29 +90,29 @@
"playwright": "1.0.1",
"prettier": "2.0.5",
"prompts": "2.3.2",
"rollup": "2.9.1",
"rollup-plugin-postcss": "3.1.1",
"rollup-plugin-typescript2": "0.27.0",
"rollup-plugin-vue": "5.1.7",
"semantic-release": "17.0.7",
"serve-handler": "6.1.2",
"terser": "4.6.13",
"ts-jest": "25.5.1",
"ts-loader": "7.0.4",
"ts-node": "8.10.1",
"tslib": "1.11.2",
"typescript": "3.8.3",
"rollup": "2.13.1",
"rollup-plugin-postcss": "3.1.2",
"rollup-plugin-typescript2": "0.27.1",
"rollup-plugin-vue": "5.1.9",
"semantic-release": "17.0.8",
"serve-handler": "6.1.3",
"terser": "4.7.0",
"ts-jest": "26.1.0",
"ts-loader": "7.0.5",
"ts-node": "8.10.2",
"tslib": "2.0.0",
"typescript": "3.9.5",
"vue": "2.6.11",
"vue-jest": "3.0.5",
"vue-loader": "15.9.2",
"vue-server-renderer": "2.6.11",
"vue-template-compiler": "2.6.11",
"vuex": "3.1.3",
"vuex": "3.4.0",
"yargs-parser": "18.1.3"
},
"peerDependencies": {
"vue": "2.6.11",
"vuex": "3.1.3"
"vuex": "^3"
},
"dependencies": {},
"engines": {
Expand Down
9 changes: 6 additions & 3 deletions src/sourcepoint-callbacks/create-callback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { OptionalCallbackKeys, OptionalCallbacks, UnregisterCallback } from './typings';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
type Callback = (...args: any) => void;

const getEventStore = (): OptionalCallbacks => {
if (typeof window === 'undefined') {
return {};
Expand All @@ -21,7 +24,7 @@ const getEventStore = (): OptionalCallbacks => {
const bindCallbacksToEvent = (
name: OptionalCallbackKeys,
eventStore: OptionalCallbacks,
callbacks: Set<Function>,
callbacks: Set<Callback>,
): void => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
eventStore[name] = (...args: any[]): void => {
Expand All @@ -31,9 +34,9 @@ const bindCallbacksToEvent = (
};
};

export const createCallback = <T extends Function>(name: OptionalCallbackKeys): ((fn: T) => UnregisterCallback) => {
export const createCallback = <T extends Callback>(name: OptionalCallbackKeys): ((fn: T) => UnregisterCallback) => {
let isBound = false;
const callbacks = new Set<Function>();
const callbacks = new Set<Callback>();

return (fn: T): UnregisterCallback => {
if (!isBound) {
Expand Down
5 changes: 3 additions & 2 deletions src/sourcepoint/post-custom-consent.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { postCustomConsent } from './post-custom-consent';
import { GenericCallback } from '../tcf-v2/typings';

describe('postCustomConsent', () => {
it('should call the __tcfapi function', () => {
Expand All @@ -23,7 +24,7 @@ describe('postCustomConsent', () => {
});

it('should reject the command if the success parameter of the callback is false', async () => {
window.__tcfapi = (_command: string, _version: number, callback: Function): void => {
window.__tcfapi = (_command: string, _version: number, callback: GenericCallback): void => {
callback(null, false);
};

Expand All @@ -35,7 +36,7 @@ describe('postCustomConsent', () => {
it('should resolve the command with the expected result', async () => {
const result = {};

window.__tcfapi = (_command: string, _version: number, callback: Function): void => {
window.__tcfapi = (_command: string, _version: number, callback: GenericCallback): void => {
callback(result, true);
};

Expand Down
4 changes: 2 additions & 2 deletions src/sourcepoint/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export type PostCustomConsentPayload = {
export type PostCustomConsentCallback = (data: PostCustomConsentResult | null, success: boolean) => void;

export type Config = {
accountId: number;
accountId?: number;
wrapperAPIOrigin?: string;
propertyId: number;
propertyId?: number;
mmsDomain?: string;
events?: OptionalCallbacks;
};
Expand Down
5 changes: 4 additions & 1 deletion src/tcf-v2/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ export type RemoveEventListenerCallback = (success: boolean) => void;

export type PingCallback = (ping: PingReturn) => void;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type GenericCallback = (...args: any) => void;

export interface TCFV2API {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(command: string, version: 2, callback: (...args: any) => void, parameter?: any): void;
(command: string, version: 2, callback: GenericCallback, parameter?: any): void;
(command: 'addEventListener', version: 2, callback: AddEventListenerCallback): void;
(command: 'removeEventListener', version: 2, callback: RemoveEventListenerCallback, listenerId: ListenerId): void;
(command: 'getTCData', version: 2, callback: GetTCDataCallback, vendorIds?: number[]): void;
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/ConsentActions/ConsentActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ type Methods = {
refreshConsents(): void;
};
export default Vue.extend<{}, Methods, {}, {}>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, Methods, NonNullish, NonNullish>({
name: 'ConsentActions',
methods: {
...mapActions({ refreshConsents: 'sourcepoint/bootstrapConsents' }),
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/ConsentManagement/ConsentManagement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ type Methods = {
hasCustomPurposeConsent(id: string): boolean;
};
export default Vue.extend<{}, Methods, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, Methods, NonNullish, Props>({
name: 'ConsentManagement',
props: {
vendorId: {
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/ConsentWrapper/ConsentWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ type Props = {
vendorId: string;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'ConsentWrapper',
components: { PrivacyManager, VendorMapping, ConsentManagement, ConsentedData },
props: {
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/EmbedConsent/EmbedConsent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ type Props = {
customConsents: CustomConsent;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedInstagramConsent',
components: { EmbedPlaceholder, ConsentWrapper, EmbedContent },
props: {
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/EmbedContent/EmbedContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ type Props = {
content: string;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedContent',
props: {
content: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'EmbedFacebookConsent',
components: { ConsentWrapper, EmbedFacebookPlaceholder, EmbedContent },
data: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedFacebookPlaceholder',
components: { EmbedSocialNetworksPlaceholder },
props: {
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/EmbedInstagram/EmbedInstagram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ type Props = {
content: string;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'EmbedInstagram',
components: { EmbedContent },
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'EmbedInstagramConsent',
components: { EmbedInstagram, EmbedInstagramPlaceholder, ConsentWrapper },
data: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedInstagramPlaceholder',
components: { EmbedSocialNetworksPlaceholder },
props: {
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/EmbedPlaceholder/EmbedPlaceholder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ type Props = {
customConsents: PostCustomConsentPayload;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedPlaceholder',
components: { ConsentActions },
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ type Data = {
customConsents: PostCustomConsentPayload;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'EmbedSocialNetworksPlaceholder',
components: { PrivacyManager, EmbedPlaceholder },
data: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'EmbedTwitterConsent',
components: { ConsentWrapper, EmbedTwitterPlaceholder, EmbedContent },
data: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedTwitterPlaceholder',
components: { EmbedSocialNetworksPlaceholder },
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'EmbedYoutubeConsent',
components: { ConsentWrapper, EmbedContent, EmbedYoutubePlaceholder },
data: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<{}, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<NonNullish, NonNullish, NonNullish, Props>({
name: 'EmbedPlaceholderYoutube',
components: { EmbedSocialNetworksPlaceholder },
props: {
Expand Down
2 changes: 1 addition & 1 deletion src/vue/components/PrivacyManager/PrivacyManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('PrivacyManager component', () => {
mount(PrivacyManager, {
scopedSlots: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
default({ loadPrivacyManagerModal }: { loadPrivacyManagerModal: Function }): any {
default({ loadPrivacyManagerModal }: { loadPrivacyManagerModal: (id: number) => void }): any {
expect(loadPrivacyManagerModal).toBeInstanceOf(Function);
},
},
Expand Down
4 changes: 3 additions & 1 deletion src/vue/components/SocialSharingPopup/SocialSharingPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ type Props = {
privacyManagerId: number;
};
export default Vue.extend<Data, {}, {}, Props>({
type NonNullish = Record<string, unknown>;
export default Vue.extend<Data, NonNullish, NonNullish, Props>({
name: 'SocialSharingPopup',
components: { PrivacyManager, ConsentActions },
data: () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Vuex, { Store } from 'vuex';
import { sourcepoint } from '../index';
import { reloadPageOnReject } from './reload-page-on-reject';

const createStore = (): Store<{}> => {
const createStore = (): Store<Record<string, unknown>> => {
Vue.use(Vuex);

return new Vuex.Store({
Expand All @@ -18,7 +18,7 @@ const { location } = window;
describe('effect reloadPageOnReject', () => {
beforeEach(() => {
delete window.location;
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
window.location = {
reload: jest.fn(),
Expand Down
2 changes: 1 addition & 1 deletion src/vue/vuex/sourcepoint/effects/reload-page-on-reject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type RootState = {
sourcepoint: SourcepointModuleState;
};

export const reloadPageOnReject = (store: Store<{}>): (() => void) => {
export const reloadPageOnReject = (store: Store<Record<string, unknown>>): (() => void) => {
let vendors: CustomConsent[] = [];
let purposes: CustomConsent[] = [];

Expand Down
2 changes: 1 addition & 1 deletion src/vue/vuex/sourcepoint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const actions = {
},
};

export const sourcepoint: Module<SourcepointModuleState, {}> = {
export const sourcepoint: Module<SourcepointModuleState, Record<string, unknown>> = {
namespaced: true,
state,
mutations,
Expand Down

0 comments on commit c4acbda

Please sign in to comment.