Skip to content
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
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ jobs:
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- uses: nrwl/nx-set-shas@v3
- uses: actions/setup-node@v3
- uses: nrwl/nx-set-shas@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
cache: 'npm'
- run: npm ci
- run: npx nx workspace-lint
- run: if ! npx nx format:check ; then echo "Format check failed. Please run 'npx nx format:write'."; fi
- run: npx nx affected --target=lint --parallel=3
- run: npx nx affected --target=test --parallel=3 --ci --code-coverage
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ npm-debug.log
yarn-error.log
testem.log
/typings
.nx

# System Files
.DS_Store
Expand All @@ -43,4 +44,4 @@ Thumbs.db

# yalc stuff
.yalc
yalc.lock
yalc.lock
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

/dist
/coverage
/.nx
21 changes: 17 additions & 4 deletions config/k8s/end-to-end.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# A basic flag custom resource
apiVersion: core.openfeature.dev/v1alpha2
kind: FeatureFlagConfiguration
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlag
metadata:
name: end-to-end
labels:
app: open-feature-demo
spec:
featureFlagSpec:
flagSpec:
flags:
new-welcome-message:
state: ENABLED
Expand Down Expand Up @@ -53,6 +53,19 @@ spec:
'off': false
defaultVariant: 'off'
---
# Feature flag source custom resource, configuring flagd to source flags from FeatureFlag crd
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlagSource
metadata:
name: end-to-end
labels:
app: open-feature-demo
spec:
sources:
- source: end-to-end
provider: kubernetes

---
# Deployment of a demo-app using our custom resource
apiVersion: apps/v1
kind: Deployment
Expand All @@ -71,7 +84,7 @@ spec:
app: open-feature-demo
annotations:
openfeature.dev/enabled: "true"
openfeature.dev/featureflagconfiguration: "end-to-end"
openfeature.dev/featureflagsource: "end-to-end"
spec:
containers:
- name: open-feature-demo
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ services:
- FIB_SERVICE_URL=http://fib-service:30001
- FIB_SERVICE_USER
- FIB_SERVICE_PASS
- ENABLED_SPAN_BASED_TRACES
# Provider values come from the .env
- NEW_WELCOME_MESSAGE
- FIB_ALGO
Expand Down Expand Up @@ -60,7 +59,6 @@ services:
- OTEL_SERVICE_NAME=fibonacci-service
- FIB_SERVICE_USER
- FIB_SERVICE_PASS
- ENABLED_SPAN_BASED_TRACES
# Provider values come from the .env
- NEW_WELCOME_MESSAGE
- FIB_ALGO
Expand Down
192 changes: 54 additions & 138 deletions migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,171 +2,87 @@
"migrations": [
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Remove @nrwl/cli.",
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli",
"package": "nx",
"name": "16.0.0-remove-nrwl-cli"
},
{
"cli": "nx",
"version": "16.0.0-beta.9",
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens",
"package": "nx",
"name": "16.0.0-tokens-for-depends-on"
},
{
"cli": "nx",
"version": "16.0.0-beta.0",
"description": "Replace @nrwl/nx-cloud with nx-cloud",
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner",
"package": "nx",
"name": "16.0.0-update-nx-cloud-runner"
},
{
"cli": "nx",
"version": "16.2.0-beta.0",
"description": "Remove outputPath from run commands",
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path",
"package": "nx",
"name": "16.2.0-remove-output-path-from-run-commands"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/devkit with @nx/devkit",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/devkit",
"name": "update-16-0-0-add-nx-packages"
"version": "16.7.0-beta.2",
"description": "Add @babel/core to package.json if @babel/preset-react is present",
"implementation": "./src/migrations/update-16-7-0/add-babel-core",
"package": "@nx/react",
"name": "add-babel-core"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/workspace with @nx/workspace",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/workspace",
"name": "update-16-0-0-add-nx-packages"
"version": "16.7.0-beta.2",
"description": "Add @nx/react types to tsconfig types array",
"implementation": "./src/migrations/update-16-7-0-add-typings/update-16-7-0-add-typings",
"package": "@nx/react",
"name": "update-16-7-0-add-typings"
},
{
"version": "16.0.0-beta.4",
"description": "Generates a plugin called 'workspace-plugin' containing your workspace generators.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/move-workspace-generators-to-local-plugin",
"package": "@nx/workspace",
"name": "16-0-0-move-workspace-generators-into-local-plugin"
"version": "16.5.0-beta.2",
"description": "Add test-setup.ts to ignored files in production input",
"implementation": "./src/migrations/update-16-5-0/add-test-setup-to-inputs-ignore",
"package": "@nx/jest",
"name": "add-test-setup-to-inputs-ignore"
},
{
"version": "16.0.0-beta.9",
"description": "Fix .babelrc presets if it contains an invalid entry for @nx/web/babel.",
"cli": "nx",
"implementation": "./src/migrations/update-16-0-0/fix-invalid-babelrc",
"package": "@nx/workspace",
"name": "16-0-0-fix-invalid-babelrc"
"version": "17.1.0-beta.2",
"description": "Move jest executor options to nx.json targetDefaults",
"implementation": "./src/migrations/update-17-1-0/move-options-to-target-defaults",
"package": "@nx/jest",
"name": "move-options-to-target-defaults"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/js with @nx/js",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"version": "16.6.0-beta.0",
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
"package": "@nx/js",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/linter with @nx/linter",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/linter",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/web with @nx/web",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/web",
"name": "update-16-0-0-add-nx-packages"
"name": "explicitly-set-projects-to-update-buildable-deps"
},
{
"cli": "nx",
"version": "16.0.0-beta.4",
"description": "Replace @nx/web executors with @nx/webpack and @nx/rollup",
"implementation": "./src/migrations/update-16-0-0-update-executors/update-16-0-0-update-executors",
"package": "@nx/web",
"name": "update-16-0-0-update-executors"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/eslint-plugin with @nx/eslint-plugin",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/eslint-plugin",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/react with @nx/react",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/react",
"name": "update-16-0-0-add-nx-packages"
},
{
"cli": "nx",
"version": "16.2.0-beta.0",
"description": "Remove react-test-renderer from package.json",
"implementation": "./src/migrations/update-16-2-0-remove-package/update-16-2-0-remove-package",
"package": "@nx/react",
"name": "update-16-2-0-remove-package"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/jest with @nx/jest",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/jest",
"name": "update-16-0-0-add-nx-packages"
"version": "16.8.2-beta.0",
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
"factory": "./src/migrations/update-16-8-2/update-swcrc",
"package": "@nx/js",
"name": "16-8-2-update-swcrc"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/node with @nx/node",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/node",
"name": "update-16-0-0-add-nx-packages"
"version": "17.0.2",
"description": "Remove deprecated build options",
"implementation": "./src/migrations/update-17-0-0/remove-deprecated-build-options",
"package": "@nx/js",
"name": "update-17-0-0-remove-deprecated-build-options"
},
{
"cli": "nx",
"version": "16.0.0-beta.5",
"description": "Replace @nx/node:webpack with @nx/node:webpack",
"implementation": "./src/migrations/update-16-0-0/update-webpack-executor",
"package": "@nx/node",
"name": "update-16-0-0-update-executor"
"version": "16.9.0-beta.1",
"description": "Replace imports of Module Federation utils frm @nx/devkit to @nx/webpack",
"implementation": "./src/migrations/update-16-9-0/migrate-mf-util-usage",
"package": "@nx/devkit",
"name": "update-16-9-0-migrate-mf-usage-to-webpack"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/express with @nx/express",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/express",
"name": "update-16-0-0-add-nx-packages"
"version": "16.8.0",
"description": "update-16-8-0-add-ignored-files",
"implementation": "./src/migrations/update-16-8-0-add-ignored-files/update-16-8-0-add-ignored-files",
"package": "@nx/linter",
"name": "update-16-8-0-add-ignored-files"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/nest with @nx/nest",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/nest",
"name": "update-16-0-0-add-nx-packages"
"version": "17.0.0-beta.7",
"description": "update-17-0-0-rename-to-eslint",
"implementation": "./src/migrations/update-17-0-0-rename-to-eslint/update-17-0-0-rename-to-eslint",
"package": "@nx/linter",
"name": "update-17-0-0-rename-to-eslint"
},
{
"cli": "nx",
"version": "16.0.0-beta.1",
"description": "Replace @nx/webpack with @nx/webpack",
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
"package": "@nx/webpack",
"name": "update-16-0-0-add-nx-packages"
"version": "17.1.0-beta.1",
"description": "Updates for @typescript-utils/utils v6.9.1+",
"implementation": "./src/migrations/update-17-1-0/update-typescript-eslint",
"package": "@nx/linter",
"name": "update-typescript-eslint"
}
]
}
27 changes: 19 additions & 8 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@
"tasksRunnerOptions": {
"default": {
"runner": "@nx/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
"options": {}
}
},
"extends": "nx/presets/core.json",
"workspaceLayout": {
"libsDir": "packages",
"appsDir": "packages"
},
"npmScope": "openfeature",
"affected": {
"defaultBase": "main"
},
"cli": {
"defaultCollection": "@nx/express"
},
"defaultProject": "app",
"generators": {
"@nx/react": {
Expand All @@ -39,12 +33,29 @@
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"targetDefaults": {
"build": {
"dependsOn": ["^build"]
"dependsOn": ["^build"],
"inputs": ["production", "^production"],
"cache": true
},
"lint": {
"cache": true
},
"test": {
"cache": true
},
"e2e": {
"cache": true
}
},
"pluginsConfig": {
"@nx/js": {
"analyzeSourceFiles": true
}
},
"nxCloudAccessToken": "MzczOGQ0MDAtNTU1MC00NzMzLTk0YmMtMzQ5ZWYyMTQzNmRjfHJlYWQtd3JpdGU=",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [],
"production": ["default"]
}
}
Loading