Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: to use combine adapters with one #1971

Merged
merged 9 commits into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .changeset/dull-bees-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
"@commercetools-backend/express": patch
"@commercetools-backend/loggers": patch
"@commercetools-frontend/actions-global": patch
"@commercetools-frontend/application-components": patch
"@commercetools-frontend/application-config": patch
"@commercetools-frontend/application-shell-connectors": patch
"@commercetools-frontend/application-shell": patch
"@commercetools-frontend/assets": patch
"@commercetools-frontend/babel-preset-mc-app": patch
"@commercetools-frontend/browser-history": patch
"@commercetools-frontend/constants": patch
"@commercetools-frontend/create-mc-app": patch
"@commercetools-frontend/cypress": patch
"@commercetools-frontend/jest-preset-mc-app": patch
"@commercetools-frontend/jest-stylelint-runner": patch
"@commercetools-frontend/l10n": patch
"@commercetools-frontend/mc-dev-authentication": patch
"@commercetools-frontend/mc-html-template": patch
"@commercetools-frontend/mc-scripts": patch
"@commercetools-frontend/notifications": patch
"@commercetools-frontend/permissions": patch
"@commercetools-frontend/react-notifications": patch
"@commercetools-frontend/sdk": patch
"@commercetools-frontend/sentry": patch
---

Add internal opt-in support for combining feature flag adapters.
8 changes: 8 additions & 0 deletions @types-extensions/graphql-mc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ declare module '*/project-switcher.mc.graphql' {
export default defaultDocument;
}

declare module '*/fetch-all-features.mc.graphql' {
import { DocumentNode } from 'graphql';
const defaultDocument: DocumentNode;
export const AllFeatures: DocumentNode;

export default defaultDocument;
}

declare module '*/select-user-id.mc.graphql' {
import { DocumentNode } from 'graphql';
const defaultDocument: DocumentNode;
Expand Down
16 changes: 14 additions & 2 deletions packages-backend/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,27 @@
"directory": "packages-backend/express"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": ["javascript", "nodejs", "express", "http", "server", "toolkit"],
"keywords": [
"javascript",
"nodejs",
"express",
"http",
"server",
"toolkit"
],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/commercetools-backend-express.cjs.js",
"module": "dist/commercetools-backend-express.esm.js",
"files": ["dist", "package.json", "LICENSE", "README.md"],
"files": [
"dist",
"package.json",
"LICENSE",
"README.md"
],
"dependencies": {
"@babel/runtime": "7.12.5",
"@babel/runtime-corejs3": "7.12.5",
Expand Down
7 changes: 6 additions & 1 deletion packages-backend/loggers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
},
"main": "dist/commercetools-backend-loggers.cjs.js",
"module": "dist/commercetools-backend-loggers.esm.js",
"files": ["dist", "package.json", "LICENSE", "README.md"],
"files": [
"dist",
"package.json",
"LICENSE",
"README.md"
],
"dependencies": {
"@babel/runtime": "7.12.5",
"@babel/runtime-corejs3": "7.12.5",
Expand Down
14 changes: 12 additions & 2 deletions packages/actions-global/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,25 @@
"directory": "packages/actions-global"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": ["javascript", "frontend", "react", "toolkit"],
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/commercetools-frontend-actions-global.cjs.js",
"module": "dist/commercetools-frontend-actions-global.esm.js",
"files": ["dist", "package.json", "LICENSE", "README.md"],
"files": [
"dist",
"package.json",
"LICENSE",
"README.md"
],
"scripts": {
"prepare": "./../../scripts/version.js replace"
},
Expand Down
12 changes: 10 additions & 2 deletions packages/application-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
"directory": "packages/application-components"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": ["javascript", "frontend", "react", "toolkit"],
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"license": "MIT",
"private": false,
"publishConfig": {
Expand All @@ -18,7 +23,10 @@
"main": "dist/commercetools-frontend-application-components.cjs.js",
"module": "dist/commercetools-frontend-application-components.esm.js",
"preconstruct": {
"entrypoints": ["./index.ts", "./experimental/index.ts"]
"entrypoints": [
"./index.ts",
"./experimental/index.ts"
]
},
"files": [
"dist",
Expand Down
16 changes: 14 additions & 2 deletions packages/application-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,27 @@
"directory": "packages/application-config"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": ["javascript", "frontend", "react", "toolkit", "config"],
"keywords": [
"javascript",
"frontend",
"react",
"toolkit",
"config"
],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/commercetools-frontend-application-config.cjs.js",
"module": "dist/commercetools-frontend-application-config.esm.js",
"files": ["dist", "schema.json", "package.json", "LICENSE", "README.md"],
"files": [
"dist",
"schema.json",
"package.json",
"LICENSE",
"README.md"
],
"scripts": {
"prepare": "./../../scripts/version.js replace",
"prebuild": "yarn build:schema",
Expand Down
20 changes: 17 additions & 3 deletions packages/application-shell-connectors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,31 @@
"directory": "packages/application-shell-connectors"
},
"homepage": "https://docs.commercetools.com/custom-applications",
"keywords": ["javascript", "frontend", "react", "toolkit"],
"keywords": [
"javascript",
"frontend",
"react",
"toolkit"
],
"license": "MIT",
"private": false,
"publishConfig": {
"access": "public"
},
"main": "dist/commercetools-frontend-application-shell-connectors.cjs.js",
"module": "dist/commercetools-frontend-application-shell-connectors.esm.js",
"files": ["dist", "test-utils", "package.json", "LICENSE", "README.md"],
"files": [
"dist",
"test-utils",
"package.json",
"LICENSE",
"README.md"
],
"preconstruct": {
"entrypoints": ["./index.ts", "./test-utils/index.ts"]
"entrypoints": [
"./index.ts",
"./test-utils/index.ts"
]
},
"scripts": {
"prepare": "./../../scripts/version.js replace"
Expand Down
15 changes: 15 additions & 0 deletions packages/application-shell-connectors/src/types/generated/mc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export type Scalars = {
Float: number;
};





export type TAdditionalUserInfo = {
firstName: Scalars['String'];
lastName: Scalars['String'];
Expand Down Expand Up @@ -810,6 +814,17 @@ export type TFetchUserProjectsQuery = (
)> }
);

export type TAllFeaturesQueryVariables = Exact<{ [key: string]: never; }>;


export type TAllFeaturesQuery = (
{ __typename?: 'Query' }
& { allFeatures: Array<(
{ __typename?: 'Feature' }
& Pick<TFeature, 'name' | 'value'>
)> }
);

export type TFetchUserIdQueryVariables = Exact<{ [key: string]: never; }>;


Expand Down
2 changes: 2 additions & 0 deletions packages/application-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
"@commercetools/http-user-agent": "2.1.2",
"@emotion/react": "11.1.4",
"@emotion/styled": "11.0.0",
"@flopflip/combine-adapters": "0.0.14",
"@flopflip/http-adapter": "0.0.5",
"@flopflip/launchdarkly-adapter": "5.0.8",
"@flopflip/memory-adapter": "3.0.12",
"@flopflip/react-broadcast": "12.1.10",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
query AllFeatures {
allFeatures {
name
value
reason
}
}
Loading