mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	chore: upgrade to yarn v4 (#7230)
 This has been on our TODO list for a long time. We're moving to latest released at the time of commit (v4.2.2)
This commit is contained in:
		
							parent
							
								
									215608c4b2
								
							
						
					
					
						commit
						15726cc8ac
					
				
							
								
								
									
										4
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/build.yaml
									
									
									
									
										vendored
									
									
								
							@ -40,7 +40,9 @@ jobs:
 | 
				
			|||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20.x
 | 
					          node-version: 20.x
 | 
				
			||||||
          cache: 'yarn'
 | 
					          cache: 'yarn'
 | 
				
			||||||
      - run: yarn install --frozen-lockfile --ignore-scripts
 | 
					      - run: yarn install --immutable
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          YARN_ENABLE_SCRIPTS: false
 | 
				
			||||||
      - run: yarn lint
 | 
					      - run: yarn lint
 | 
				
			||||||
      - run: yarn build:backend
 | 
					      - run: yarn build:backend
 | 
				
			||||||
      - run: yarn run test:report # This adds test results as github check to the workflow
 | 
					      - run: yarn run test:report # This adds test results as github check to the workflow
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/build_frontend_prs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build_frontend_prs.yml
									
									
									
									
										vendored
									
									
								
							@ -19,8 +19,8 @@ jobs:
 | 
				
			|||||||
        uses: actions/setup-node@v4
 | 
					        uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          node-version: 20.x
 | 
					          node-version: 20.x
 | 
				
			||||||
 | 
					      - run: yarn --immutable
 | 
				
			||||||
      - run: yarn run lint:material:icons
 | 
					      - run: yarn run lint:material:icons
 | 
				
			||||||
      - run: yarn --frozen-lockfile
 | 
					 | 
				
			||||||
      - run: yarn run lint:check
 | 
					      - run: yarn run lint:check
 | 
				
			||||||
      - run: yarn run test
 | 
					      - run: yarn run test
 | 
				
			||||||
      - run: yarn run ts:check # TODO: optimize
 | 
					      - run: yarn run ts:check # TODO: optimize
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/dependency-review.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/dependency-review.yml
									
									
									
									
										vendored
									
									
								
							@ -17,5 +17,5 @@ jobs:
 | 
				
			|||||||
        uses: actions/dependency-review-action@v4
 | 
					        uses: actions/dependency-review-action@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          fail-on-severity: moderate
 | 
					          fail-on-severity: moderate
 | 
				
			||||||
          allow-licenses: Apache-2.0, MIT, BSD-2-Clause, BSD-3-Clause, ISC, CC0-1.0, Unlicense
 | 
					          allow-licenses: Apache-2.0, MIT, BSD-2-Clause, BSD-3-Clause, ISC, CC0-1.0, Unlicense, BlueOak-1.0.0
 | 
				
			||||||
          comment-summary-in-pr: always
 | 
					          comment-summary-in-pr: always
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										3
									
								
								.github/workflows/e2e.frontend.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/e2e.frontend.yaml
									
									
									
									
										vendored
									
									
								
							@ -20,9 +20,10 @@ jobs:
 | 
				
			|||||||
      - name: Checkout
 | 
					      - name: Checkout
 | 
				
			||||||
        uses: actions/checkout@v4
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
      - name: Run Cypress
 | 
					      - name: Run Cypress
 | 
				
			||||||
        uses: cypress-io/github-action@v5
 | 
					        uses: cypress-io/github-action@v6
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          working-directory: frontend
 | 
					          working-directory: frontend
 | 
				
			||||||
          env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
 | 
					          env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
 | 
				
			||||||
          config: baseUrl=${{ github.event.deployment_status.target_url }}
 | 
					          config: baseUrl=${{ github.event.deployment_status.target_url }}
 | 
				
			||||||
          spec: cypress/integration/${{ matrix.test }}
 | 
					          spec: cypress/integration/${{ matrix.test }}
 | 
				
			||||||
 | 
					          install-command: yarn --immutable
 | 
				
			||||||
 | 
				
			|||||||
@ -50,9 +50,9 @@ jobs:
 | 
				
			|||||||
          YARN_1="yarn --mutex network --cwd ./current"
 | 
					          YARN_1="yarn --mutex network --cwd ./current"
 | 
				
			||||||
          YARN_2="yarn --mutex network --cwd ./main"
 | 
					          YARN_2="yarn --mutex network --cwd ./main"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          $YARN_1 install --ignore-scripts &> /dev/null && $YARN_1 build:backend --strictNullChecks true 2> .stderr-current > .out-current &
 | 
					          $YARN_1 install  &> /dev/null && $YARN_1 build:backend --strictNullChecks true 2> .stderr-current > .out-current &
 | 
				
			||||||
          pid1=$!
 | 
					          pid1=$!
 | 
				
			||||||
          $YARN_2 install --ignore-scripts &> /dev/null && $YARN_2 build:backend --strictNullChecks true 2> .stderr-main > .out-main &
 | 
					          $YARN_2 install  &> /dev/null && $YARN_2 build:backend --strictNullChecks true 2> .stderr-main > .out-main &
 | 
				
			||||||
          pid2=$!
 | 
					          pid2=$!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # wait for the processes that are expected to fail
 | 
					          # wait for the processes that are expected to fail
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										11
									
								
								.github/workflows/notify_enterprise.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/notify_enterprise.yaml
									
									
									
									
										vendored
									
									
								
							@ -12,12 +12,13 @@ jobs:
 | 
				
			|||||||
  build:
 | 
					  build:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        node-version: [20.x]
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					      - name: Use Node.js 20
 | 
				
			||||||
 | 
					        uses: actions/setup-node@v4
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          node-version: 20.x
 | 
				
			||||||
 | 
					          cache: 'yarn'
 | 
				
			||||||
      - name: Trigger sync
 | 
					      - name: Trigger sync
 | 
				
			||||||
        uses: actions/github-script@v7
 | 
					        uses: actions/github-script@v7
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
@ -42,7 +43,7 @@ jobs:
 | 
				
			|||||||
      - name: Build static assets
 | 
					      - name: Build static assets
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          cd frontend
 | 
					          cd frontend
 | 
				
			||||||
          yarn install --frozen-lockfile
 | 
					          yarn install --immutable
 | 
				
			||||||
          yarn build
 | 
					          yarn build
 | 
				
			||||||
      - uses: aws-actions/configure-aws-credentials@v2
 | 
					      - uses: aws-actions/configure-aws-credentials@v2
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										16
									
								
								.github/workflows/publish-new-version.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/publish-new-version.yaml
									
									
									
									
										vendored
									
									
								
							@ -6,7 +6,7 @@ concurrency:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
permissions:
 | 
					permissions:
 | 
				
			||||||
  contents: write
 | 
					  contents: write
 | 
				
			||||||
  id-token: write  
 | 
					  id-token: write
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on:
 | 
					on:
 | 
				
			||||||
  workflow_dispatch:
 | 
					  workflow_dispatch:
 | 
				
			||||||
@ -30,7 +30,7 @@ jobs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        node-version: [20.x]
 | 
					        node-version: [ 20.x ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
@ -66,10 +66,12 @@ jobs:
 | 
				
			|||||||
          else
 | 
					          else
 | 
				
			||||||
            echo "No changes to CHANGELOG.md"
 | 
					            echo "No changes to CHANGELOG.md"
 | 
				
			||||||
          fi
 | 
					          fi
 | 
				
			||||||
      - run: yarn install --frozen-lockfile --ignore-scripts
 | 
					      - run: yarn install --immutable
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          YARN_ENABLE_SCRIPTS: false
 | 
				
			||||||
      - name: npm version
 | 
					      - name: npm version
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          npm version ${{ github.event.inputs.version }} --ignore-scripts
 | 
					          npm version ${{ github.event.inputs.version }}
 | 
				
			||||||
          git push origin ${{ github.ref_name }}
 | 
					          git push origin ${{ github.ref_name }}
 | 
				
			||||||
          git push --tags
 | 
					          git push --tags
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
@ -104,8 +106,10 @@ jobs:
 | 
				
			|||||||
        run: git checkout origin/${{ github.ref_name }} -- CHANGELOG.md
 | 
					        run: git checkout origin/${{ github.ref_name }} -- CHANGELOG.md
 | 
				
			||||||
      - name: lint
 | 
					      - name: lint
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          yarn install --frozen-lockfile --ignore-scripts
 | 
					          yarn install --immutable
 | 
				
			||||||
          yarn lint:fix
 | 
					          yarn lint:fix
 | 
				
			||||||
 | 
					        env:
 | 
				
			||||||
 | 
					          YARN_ENABLE_SCRIPTS: false
 | 
				
			||||||
      - name: push changes
 | 
					      - name: push changes
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          git add package.json CHANGELOG.md
 | 
					          git add package.json CHANGELOG.md
 | 
				
			||||||
@ -118,7 +122,7 @@ jobs:
 | 
				
			|||||||
    secrets: inherit
 | 
					    secrets: inherit
 | 
				
			||||||
    with:
 | 
					    with:
 | 
				
			||||||
      version: ${{ github.event.inputs.version }}
 | 
					      version: ${{ github.event.inputs.version }}
 | 
				
			||||||
  
 | 
					
 | 
				
			||||||
  publish-npm:
 | 
					  publish-npm:
 | 
				
			||||||
    needs: build
 | 
					    needs: build
 | 
				
			||||||
    uses: ./.github/workflows/release.yaml
 | 
					    uses: ./.github/workflows/release.yaml
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/release.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/release.yaml
									
									
									
									
										vendored
									
									
								
							@ -27,7 +27,7 @@ jobs:
 | 
				
			|||||||
          cache: 'yarn'
 | 
					          cache: 'yarn'
 | 
				
			||||||
      - name: Build
 | 
					      - name: Build
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          yarn install --frozen-lockfile
 | 
					          yarn install --immutable
 | 
				
			||||||
      - name: Publish to npm
 | 
					      - name: Publish to npm
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          LATEST=$(npm show unleash-server version)
 | 
					          LATEST=$(npm show unleash-server version)
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								.github/workflows/validate-migrations.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/validate-migrations.yaml
									
									
									
									
										vendored
									
									
								
							@ -18,8 +18,8 @@ jobs:
 | 
				
			|||||||
      - name: Use Node.js 20.x
 | 
					      - name: Use Node.js 20.x
 | 
				
			||||||
        uses: actions/setup-node@v4
 | 
					        uses: actions/setup-node@v4
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
            node-version: 20.x
 | 
					          node-version: 20.x
 | 
				
			||||||
            cache: 'yarn'
 | 
					          cache: 'yarn'
 | 
				
			||||||
      - name: Start database
 | 
					      - name: Start database
 | 
				
			||||||
        working-directory: test-migrations
 | 
					        working-directory: test-migrations
 | 
				
			||||||
        run: docker compose up db -d --wait -t 90
 | 
					        run: docker compose up db -d --wait -t 90
 | 
				
			||||||
@ -29,16 +29,18 @@ jobs:
 | 
				
			|||||||
      # add some data with terraform
 | 
					      # add some data with terraform
 | 
				
			||||||
      - name: Apply migrations
 | 
					      - name: Apply migrations
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
            DATABASE_URL: postgres://postgres:unleash@localhost:5432/unleash
 | 
					          DATABASE_URL: postgres://postgres:unleash@localhost:5432/unleash
 | 
				
			||||||
            DATABASE_SSL: false
 | 
					          DATABASE_SSL: false
 | 
				
			||||||
 | 
					          YARN_ENABLE_SCRIPTS: false
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          yarn install --frozen-lockfile --ignore-scripts
 | 
					          yarn install --immutable
 | 
				
			||||||
          yarn db-migrate up
 | 
					          yarn db-migrate up
 | 
				
			||||||
      # run ui tests against previous version of Unleash
 | 
					      # run ui tests against previous version of Unleash
 | 
				
			||||||
      - name: Run Cypress
 | 
					      - name: Run Cypress
 | 
				
			||||||
        uses: cypress-io/github-action@v5
 | 
					        uses: cypress-io/github-action@v6
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          working-directory: frontend
 | 
					          working-directory: frontend
 | 
				
			||||||
          env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
 | 
					          env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
 | 
				
			||||||
          config: baseUrl=http://localhost:4242
 | 
					          config: baseUrl=http://localhost:4242
 | 
				
			||||||
          spec: cypress/oss/**/*.spec.ts
 | 
					          spec: cypress/oss/**/*.spec.ts
 | 
				
			||||||
 | 
					          install-command: yarn --immutable
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										894
									
								
								.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										894
									
								
								.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3
									
								
								.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					nodeLinker: node-modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					yarnPath: .yarn/releases/yarn-4.2.2.cjs
 | 
				
			||||||
@ -7,6 +7,10 @@ Before you begin:
 | 
				
			|||||||
- Have you read the [code of conduct](CODE_OF_CONDUCT.md)?
 | 
					- Have you read the [code of conduct](CODE_OF_CONDUCT.md)?
 | 
				
			||||||
- Check out the [existing issues](https://github.com/unleash/Unleash/issues)
 | 
					- Check out the [existing issues](https://github.com/unleash/Unleash/issues)
 | 
				
			||||||
- Browse the [developer-guide](./website/docs/contributing/developer-guide.md) for tips on environment setup, running the tests, and running Unleash from source.
 | 
					- Browse the [developer-guide](./website/docs/contributing/developer-guide.md) for tips on environment setup, running the tests, and running Unleash from source.
 | 
				
			||||||
 | 
					- You need 
 | 
				
			||||||
 | 
					  - Node 20
 | 
				
			||||||
 | 
					  - corepack enabled `corepack enable`
 | 
				
			||||||
 | 
					  - yarn installed globally `npm install -g yarn`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Don't see your issue? Open one
 | 
					### Don't see your issue? Open one
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -6,18 +6,18 @@ WORKDIR /unleash
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
COPY . /unleash
 | 
					COPY . /unleash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN yarn config set network-timeout 300000
 | 
					RUN corepack enable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN yarn install --frozen-lockfile --ignore-scripts && yarn prepare:backend && yarn local:package
 | 
					RUN yarn install --immutable  && yarn prepare:backend && yarn local:package
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# frontend/build should already exist (it needs to be built in the local filesystem but in case of a fresh build we'll build it here)
 | 
					# frontend/build should already exist (it needs to be built in the local filesystem but in case of a fresh build we'll build it here)
 | 
				
			||||||
RUN yarn build:frontend:if-needed
 | 
					RUN yarn build:frontend
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN mkdir -p /unleash/build/frontend && mv /unleash/frontend/build /unleash/build/frontend/build
 | 
					RUN mkdir -p /unleash/build/frontend && mv /unleash/frontend/build /unleash/build/frontend/build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WORKDIR /unleash/docker
 | 
					WORKDIR /unleash/docker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN yarn install --frozen-lockfile --production=true
 | 
					RUN yarn install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM node:$NODE_VERSION
 | 
					FROM node:$NODE_VERSION
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -53,7 +53,9 @@
 | 
				
			|||||||
      "src/test/examples/*.json",
 | 
					      "src/test/examples/*.json",
 | 
				
			||||||
      ".docusaurus",
 | 
					      ".docusaurus",
 | 
				
			||||||
      "coverage",
 | 
					      "coverage",
 | 
				
			||||||
      "CHANGELOG.md"
 | 
					      "CHANGELOG.md",
 | 
				
			||||||
 | 
					      "./package.json",
 | 
				
			||||||
 | 
					      "./frontend/package.json"
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "organizeImports": {
 | 
					  "organizeImports": {
 | 
				
			||||||
@ -74,7 +76,9 @@
 | 
				
			|||||||
      "coverage",
 | 
					      "coverage",
 | 
				
			||||||
      "website/build",
 | 
					      "website/build",
 | 
				
			||||||
      "website/global.js",
 | 
					      "website/global.js",
 | 
				
			||||||
      ".docusaurus"
 | 
					      ".docusaurus",
 | 
				
			||||||
 | 
					      "./package.json",
 | 
				
			||||||
 | 
					      "./frontend/package.json"
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    "indentWidth": 4
 | 
					    "indentWidth": 4
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								docker/.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docker/.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										894
									
								
								docker/.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										894
									
								
								docker/.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								docker/.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								docker/.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					yarnPath: .yarn/releases/yarn-4.2.2.cjs
 | 
				
			||||||
@ -14,15 +14,9 @@
 | 
				
			|||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "unleash-server": "file:../build"
 | 
					    "unleash-server": "file:../build"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "version": "5.12.4",
 | 
					 | 
				
			||||||
  "resolutions": {
 | 
					  "resolutions": {
 | 
				
			||||||
    "async": "^3.2.4",
 | 
					    "async": "^3.2.4",
 | 
				
			||||||
    "db-migrate/rc/minimist": "^1.2.5",
 | 
					 | 
				
			||||||
    "es5-ext": "0.10.64",
 | 
					    "es5-ext": "0.10.64",
 | 
				
			||||||
    "knex/liftoff/object.map/**/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "knex/liftoff/findup-sync/micromatc/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "knex/liftoff/findup-sync/micromatc/nanomatch/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "knex/liftoff/findup-sync/micromatch/define-property/**/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "node-forge": "^1.0.0",
 | 
					    "node-forge": "^1.0.0",
 | 
				
			||||||
    "set-value": "^4.0.1",
 | 
					    "set-value": "^4.0.1",
 | 
				
			||||||
    "ansi-regex": "^5.0.1",
 | 
					    "ansi-regex": "^5.0.1",
 | 
				
			||||||
@ -39,5 +33,7 @@
 | 
				
			|||||||
    "ssh2": "^1.4.0",
 | 
					    "ssh2": "^1.4.0",
 | 
				
			||||||
    "json-schema": "^0.4.0",
 | 
					    "json-schema": "^0.4.0",
 | 
				
			||||||
    "semver": "^7.5.3"
 | 
					    "semver": "^7.5.3"
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
 | 
					  "version": "6.0.1",
 | 
				
			||||||
 | 
					  "packageManager": "yarn@4.2.2"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										9450
									
								
								docker/yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										9450
									
								
								docker/yarn.lock
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								frontend/.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								frontend/.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										894
									
								
								frontend/.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										894
									
								
								frontend/.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								frontend/.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								frontend/.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					yarnPath: .yarn/releases/yarn-4.2.2.cjs
 | 
				
			||||||
@ -2,7 +2,10 @@
 | 
				
			|||||||
  "name": "unleash-frontend-local",
 | 
					  "name": "unleash-frontend-local",
 | 
				
			||||||
  "version": "0.0.0",
 | 
					  "version": "0.0.0",
 | 
				
			||||||
  "private": true,
 | 
					  "private": true,
 | 
				
			||||||
  "files": ["index.js", "build"],
 | 
					  "files": [
 | 
				
			||||||
 | 
					    "index.js",
 | 
				
			||||||
 | 
					    "build"
 | 
				
			||||||
 | 
					  ],
 | 
				
			||||||
  "engines": {
 | 
					  "engines": {
 | 
				
			||||||
    "node": ">=18"
 | 
					    "node": ">=18"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@ -16,9 +19,9 @@
 | 
				
			|||||||
    "start:demo2": "UNLEASH_API=https://sandbox.getunleash.io/ UNLEASH_BASE_PATH=/demo2/ yarn run start",
 | 
					    "start:demo2": "UNLEASH_API=https://sandbox.getunleash.io/ UNLEASH_BASE_PATH=/demo2/ yarn run start",
 | 
				
			||||||
    "start:enterprise": "UNLEASH_API=https://unleash.herokuapp.com VITE_TEST_REDIRECT=true yarn run start",
 | 
					    "start:enterprise": "UNLEASH_API=https://unleash.herokuapp.com VITE_TEST_REDIRECT=true yarn run start",
 | 
				
			||||||
    "start:demo": "UNLEASH_BASE_PATH=/demo/ UNLEASH_API=https://app.unleash-hosted.com/ yarn run start",
 | 
					    "start:demo": "UNLEASH_BASE_PATH=/demo/ UNLEASH_API=https://app.unleash-hosted.com/ yarn run start",
 | 
				
			||||||
    "test": "NODE_OPTIONS=\"${NODE_OPTIONS} --no-experimental-fetch\" vitest run",
 | 
					    "test": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" vitest run",
 | 
				
			||||||
    "test:snapshot": "NODE_OPTIONS=\"${NODE_OPTIONS} --no-experimental-fetch\" yarn test -u",
 | 
					    "test:snapshot": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" yarn test -u",
 | 
				
			||||||
    "test:watch": "NODE_OPTIONS=\"${NODE_OPTIONS} --no-experimental-fetch\" vitest watch",
 | 
					    "test:watch": "NODE_OPTIONS=\"${NODE_OPTIONS:-0} --no-experimental-fetch\" vitest watch",
 | 
				
			||||||
    "lint:material:icons": "./check-imports.rc",
 | 
					    "lint:material:icons": "./check-imports.rc",
 | 
				
			||||||
    "lint": "biome lint src --apply",
 | 
					    "lint": "biome lint src --apply",
 | 
				
			||||||
    "lint:check": "biome check src",
 | 
					    "lint:check": "biome check src",
 | 
				
			||||||
@ -146,11 +149,16 @@
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "browserslist": {
 | 
					  "browserslist": {
 | 
				
			||||||
    "production": [">0.2%", "not dead", "not op_mini all"],
 | 
					    "production": [
 | 
				
			||||||
 | 
					      ">0.2%",
 | 
				
			||||||
 | 
					      "not dead",
 | 
				
			||||||
 | 
					      "not op_mini all"
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
    "development": [
 | 
					    "development": [
 | 
				
			||||||
      "last 1 chrome version",
 | 
					      "last 1 chrome version",
 | 
				
			||||||
      "last 1 firefox version",
 | 
					      "last 1 firefox version",
 | 
				
			||||||
      "last 1 safari version"
 | 
					      "last 1 safari version"
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
 | 
					  "packageManager": "yarn@4.2.2"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										19502
									
								
								frontend/yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										19502
									
								
								frontend/yarn.lock
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										40
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										40
									
								
								package.json
									
									
									
									
									
								
							@ -36,21 +36,18 @@
 | 
				
			|||||||
    "copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/",
 | 
					    "copy-templates": "copyfiles -u 1 src/mailtemplates/**/*.mustache dist/",
 | 
				
			||||||
    "build:backend": "tsc --pretty --strictNullChecks false",
 | 
					    "build:backend": "tsc --pretty --strictNullChecks false",
 | 
				
			||||||
    "build:frontend": "yarn --cwd ./frontend run build",
 | 
					    "build:frontend": "yarn --cwd ./frontend run build",
 | 
				
			||||||
    "build:frontend:if-needed": "if [ ! -d ./frontend/build ]; then yarn install --cwd ./frontend --frozen-lockfile --ignore-scripts && yarn build:frontend; fi",
 | 
					    "build:frontend:if-needed": "if [ ! -d ./frontend/build ]; then yarn install --cwd ./frontend --frozen-lockfile  && yarn build:frontend; fi",
 | 
				
			||||||
    "build": "concurrently \"yarn:copy-templates\" \"yarn:build:frontend\" \"yarn:build:backend\"",
 | 
					    "build": "yarn run clean && concurrently \"yarn:copy-templates\" \"yarn:build:frontend\" \"yarn:build:backend\"",
 | 
				
			||||||
    "dev:backend": "TZ=UTC NODE_ENV=development tsc-watch --strictNullChecks false --onSuccess \"node dist/server-dev.js\"",
 | 
					    "dev:backend": "TZ=UTC NODE_ENV=development tsc-watch --strictNullChecks false --onSuccess \"node dist/server-dev.js\"",
 | 
				
			||||||
    "dev:frontend": "wait-on tcp:4242 && yarn --cwd ./frontend run dev",
 | 
					    "dev:frontend": "wait-on tcp:4242 && yarn --cwd ./frontend run dev",
 | 
				
			||||||
    "dev": "concurrently \"yarn:dev:backend\" \"yarn:dev:frontend\"",
 | 
					    "dev": "concurrently \"yarn:dev:backend\" \"yarn:dev:frontend\"",
 | 
				
			||||||
    "prepare:backend": "concurrently \"yarn:copy-templates\" \"yarn:build:backend\"",
 | 
					    "prepare:backend": "concurrently \"yarn:copy-templates\" \"yarn:build:backend\"",
 | 
				
			||||||
    "prestart:dev": "yarn run clean",
 | 
					    "start:dev": "yarn run clean && TZ=UTC NODE_ENV=development tsc-watch --strictNullChecks false --onSuccess \"node dist/server-dev.js\"",
 | 
				
			||||||
    "start:dev": "TZ=UTC NODE_ENV=development tsc-watch --strictNullChecks false --onSuccess \"node dist/server-dev.js\"",
 | 
					 | 
				
			||||||
    "db-migrate": "db-migrate --migrations-dir ./src/migrations",
 | 
					    "db-migrate": "db-migrate --migrations-dir ./src/migrations",
 | 
				
			||||||
    "lint": "biome check .",
 | 
					    "lint": "biome check .",
 | 
				
			||||||
    "lint:fix": "biome check . --write",
 | 
					    "lint:fix": "biome check . --write",
 | 
				
			||||||
    "local:package": "del-cli --force build && mkdir build && cp -r dist docs CHANGELOG.md LICENSE README.md package.json build",
 | 
					    "local:package": "del-cli --force build && mkdir build && cp -r dist docs CHANGELOG.md LICENSE README.md package.json build",
 | 
				
			||||||
    "prebuild:watch": "yarn run clean",
 | 
					    "build:watch": "yarn run clean && tsc -w --strictNullChecks false",
 | 
				
			||||||
    "build:watch": "tsc -w --strictNullChecks false",
 | 
					 | 
				
			||||||
    "prebuild": "yarn run clean",
 | 
					 | 
				
			||||||
    "prepare": "husky && yarn --cwd ./frontend install && if [ ! -d ./dist ]; then yarn build; fi",
 | 
					    "prepare": "husky && yarn --cwd ./frontend install && if [ ! -d ./dist ]; then yarn build; fi",
 | 
				
			||||||
    "test": "NODE_ENV=test PORT=4243 node --trace-warnings node_modules/.bin/jest",
 | 
					    "test": "NODE_ENV=test PORT=4243 node --trace-warnings node_modules/.bin/jest",
 | 
				
			||||||
    "test:unit": "NODE_ENV=test PORT=4243 jest --testPathIgnorePatterns=src/test/e2e --testPathIgnorePatterns=dist",
 | 
					    "test:unit": "NODE_ENV=test PORT=4243 jest --testPathIgnorePatterns=src/test/e2e --testPathIgnorePatterns=dist",
 | 
				
			||||||
@ -82,7 +79,9 @@
 | 
				
			|||||||
    "testTimeout": 10000,
 | 
					    "testTimeout": 10000,
 | 
				
			||||||
    "globalSetup": "./scripts/jest-setup.js",
 | 
					    "globalSetup": "./scripts/jest-setup.js",
 | 
				
			||||||
    "transform": {
 | 
					    "transform": {
 | 
				
			||||||
      "^.+\\.tsx?$": ["@swc/jest"]
 | 
					      "^.+\\.tsx?$": [
 | 
				
			||||||
 | 
					        "@swc/jest"
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
 | 
					    "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
 | 
				
			||||||
    "testPathIgnorePatterns": [
 | 
					    "testPathIgnorePatterns": [
 | 
				
			||||||
@ -91,7 +90,13 @@
 | 
				
			|||||||
      "/frontend/",
 | 
					      "/frontend/",
 | 
				
			||||||
      "/website/"
 | 
					      "/website/"
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
    "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json"],
 | 
					    "moduleFileExtensions": [
 | 
				
			||||||
 | 
					      "ts",
 | 
				
			||||||
 | 
					      "tsx",
 | 
				
			||||||
 | 
					      "js",
 | 
				
			||||||
 | 
					      "jsx",
 | 
				
			||||||
 | 
					      "json"
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
    "coveragePathIgnorePatterns": [
 | 
					    "coveragePathIgnorePatterns": [
 | 
				
			||||||
      "/node_modules/",
 | 
					      "/node_modules/",
 | 
				
			||||||
      "/dist/",
 | 
					      "/dist/",
 | 
				
			||||||
@ -214,12 +219,7 @@
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  "resolutions": {
 | 
					  "resolutions": {
 | 
				
			||||||
    "async": "^3.2.4",
 | 
					    "async": "^3.2.4",
 | 
				
			||||||
    "db-migrate/rc/minimist": "^1.2.5",
 | 
					 | 
				
			||||||
    "es5-ext": "0.10.64",
 | 
					    "es5-ext": "0.10.64",
 | 
				
			||||||
    "knex/liftoff/object.map/**/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "knex/liftoff/findup-sync/micromatc/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "knex/liftoff/findup-sync/micromatc/nanomatch/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "knex/liftoff/findup-sync/micromatch/define-property/**/kind-of": "^6.0.3",
 | 
					 | 
				
			||||||
    "node-forge": "^1.0.0",
 | 
					    "node-forge": "^1.0.0",
 | 
				
			||||||
    "set-value": "^4.0.1",
 | 
					    "set-value": "^4.0.1",
 | 
				
			||||||
    "ansi-regex": "^5.0.1",
 | 
					    "ansi-regex": "^5.0.1",
 | 
				
			||||||
@ -232,8 +232,12 @@
 | 
				
			|||||||
    "tough-cookie": "4.1.4"
 | 
					    "tough-cookie": "4.1.4"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "lint-staged": {
 | 
					  "lint-staged": {
 | 
				
			||||||
    "*.{js,ts}": ["biome check --write --no-errors-on-unmatched"],
 | 
					    "*.{js,ts}": [
 | 
				
			||||||
    "*.{jsx,tsx}": ["biome check --write --no-errors-on-unmatched"],
 | 
					      "biome check --write --no-errors-on-unmatched"
 | 
				
			||||||
    "*.json": ["biome format --write --no-errors-on-unmatched"]
 | 
					    ],
 | 
				
			||||||
  }
 | 
					    "*.{jsx,tsx}": [
 | 
				
			||||||
 | 
					      "biome check --write --no-errors-on-unmatched"
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "packageManager": "yarn@4.2.2"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -46,7 +46,7 @@ default:
 | 
				
			|||||||
.PHONY: prepare
 | 
					.PHONY: prepare
 | 
				
			||||||
prepare: 
 | 
					prepare: 
 | 
				
			||||||
	@echo "Preparing the environment..."
 | 
						@echo "Preparing the environment..."
 | 
				
			||||||
	@yarn --cwd .. install --frozen-lockfile --ignore-scripts
 | 
						@yarn --cwd .. install --frozen-lockfile 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY: apply-migrations
 | 
					.PHONY: apply-migrations
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										
											BIN
										
									
								
								website/.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								website/.yarn/install-state.gz
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										894
									
								
								website/.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
							
						
						
									
										894
									
								
								website/.yarn/releases/yarn-4.2.2.cjs
									
									
									
									
										vendored
									
									
										Executable file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								website/.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								website/.yarnrc.yml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					yarnPath: .yarn/releases/yarn-4.2.2.cjs
 | 
				
			||||||
@ -16,9 +16,10 @@ We have created a set of ADRs to help guide the development of the backend:
 | 
				
			|||||||
Before developing on this project you will need two things:
 | 
					Before developing on this project you will need two things:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- PostgreSQL 14.x or newer
 | 
					- PostgreSQL 14.x or newer
 | 
				
			||||||
- Node.js 14.x or newer
 | 
					- Node.js 20.x or newer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```sh
 | 
					```sh
 | 
				
			||||||
 | 
					corepack enable
 | 
				
			||||||
yarn install
 | 
					yarn install
 | 
				
			||||||
yarn dev
 | 
					yarn dev
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@ title: Front end
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## Frontend overview
 | 
					## Frontend overview
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The frontend is written in react/typescript. It's is a single page application that communicates with the backend via a REST API. The frontend is built using vite and served by the backend.
 | 
					The frontend is written in react/typescript. It's a single page application that communicates with the backend via a REST API. The frontend is built using vite and served by the backend.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## ADRs
 | 
					## ADRs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -54,7 +54,11 @@
 | 
				
			|||||||
    "semver": "^7.5.3"
 | 
					    "semver": "^7.5.3"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "browserslist": {
 | 
					  "browserslist": {
 | 
				
			||||||
    "production": [">0.5%", "not dead", "not op_mini all"],
 | 
					    "production": [
 | 
				
			||||||
 | 
					      ">0.5%",
 | 
				
			||||||
 | 
					      "not dead",
 | 
				
			||||||
 | 
					      "not op_mini all"
 | 
				
			||||||
 | 
					    ],
 | 
				
			||||||
    "development": [
 | 
					    "development": [
 | 
				
			||||||
      "last 1 chrome version",
 | 
					      "last 1 chrome version",
 | 
				
			||||||
      "last 1 firefox version",
 | 
					      "last 1 firefox version",
 | 
				
			||||||
@ -70,5 +74,6 @@
 | 
				
			|||||||
    "react-router": "6.23.1",
 | 
					    "react-router": "6.23.1",
 | 
				
			||||||
    "replace-in-file": "7.2.0",
 | 
					    "replace-in-file": "7.2.0",
 | 
				
			||||||
    "typescript": "4.8.4"
 | 
					    "typescript": "4.8.4"
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
 | 
					  "packageManager": "yarn@4.2.2"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										28828
									
								
								website/yarn.lock
									
									
									
									
									
								
							
							
						
						
									
										28828
									
								
								website/yarn.lock
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user