Skip to content

Commit 7cc7df1

Browse files
committed
Merge remote-tracking branch 'origin/experiment-onestop-composer' into experiment-onestop-composer
2 parents f5c4633 + 63cc36e commit 7cc7df1

47 files changed

Lines changed: 1863 additions & 263 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ jobs:
77
steps:
88
- checkout
99
- run:
10-
name: Install pnpm
11-
command: npm i --prefix=$HOME/.local -g pnpm@9.14.4
10+
name: Enable pnpm
11+
command: |
12+
mkdir -p $HOME/.local/bin
13+
corepack enable --install-directory $HOME/.local/bin
14+
corepack prepare pnpm@10.33.4 --activate
1215
- restore_cache:
1316
keys:
14-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
15-
- deps-v10-{{ .Branch }}
17+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
18+
- deps-pnpm-10-33-4-{{ .Branch }}
1619
- run:
1720
name: Install dependencies
1821
command: pnpm install
1922
- save_cache:
20-
key: deps-v10-{{ checksum "pnpm-lock.yaml" }}
23+
key: deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
2124
paths:
2225
- ./node_modules
2326
- ./packages/eslint-config/node_modules
@@ -35,8 +38,8 @@ jobs:
3538
- checkout
3639
- restore_cache:
3740
keys:
38-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
39-
- deps-v10-{{ .Branch }}
41+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
42+
- deps-pnpm-10-33-4-{{ .Branch }}
4043
- run:
4144
name: Test
4245
command: |
@@ -56,8 +59,8 @@ jobs:
5659
- checkout
5760
- restore_cache:
5861
keys:
59-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
60-
- deps-v10-{{ .Branch }}
62+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
63+
- deps-pnpm-10-33-4-{{ .Branch }}
6164
- run:
6265
name: Test
6366
command: |
@@ -77,8 +80,8 @@ jobs:
7780
- checkout
7881
- restore_cache:
7982
keys:
80-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
81-
- deps-v10-{{ .Branch }}
83+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
84+
- deps-pnpm-10-33-4-{{ .Branch }}
8285
- run:
8386
name: Lint
8487
command: npm run pretest
@@ -91,8 +94,8 @@ jobs:
9194
- checkout
9295
- restore_cache:
9396
keys:
94-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
95-
- deps-v10-{{ .Branch }}
97+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
98+
- deps-pnpm-10-33-4-{{ .Branch }}
9699
- run:
97100
name: Fetch base branch
98101
command: git fetch origin main
@@ -107,8 +110,8 @@ jobs:
107110
- checkout
108111
- restore_cache:
109112
keys:
110-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
111-
- deps-v10-{{ .Branch }}
113+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
114+
- deps-pnpm-10-33-4-{{ .Branch }}
112115
- run:
113116
name: Test
114117
command: |
@@ -126,12 +129,15 @@ jobs:
126129
steps:
127130
- checkout
128131
- run:
129-
name: Install pnpm
130-
command: npm i --prefix=$HOME/.local -g pnpm@9.14.4
132+
name: Enable pnpm
133+
command: |
134+
mkdir -p $HOME/.local/bin
135+
corepack enable --install-directory $HOME/.local/bin
136+
corepack prepare pnpm@10.33.4 --activate
131137
- restore_cache:
132138
keys:
133-
- deps-v10-{{ checksum "pnpm-lock.yaml" }}
134-
- deps-v10-{{ .Branch }}
139+
- deps-pnpm-10-33-4-{{ checksum "pnpm-lock.yaml" }}
140+
- deps-pnpm-10-33-4-{{ .Branch }}
135141
- run:
136142
name: Install dependencies
137143
command: pnpm install

.github/workflows/e2e-tests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
required: true
1212
type: string
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
e2e-tests:
1619
if: >-
@@ -32,7 +35,7 @@ jobs:
3235
- name: Install pnpm
3336
uses: pnpm/action-setup@v4
3437
with:
35-
version: 9.14.4
38+
version: 10.33.4
3639

3740
- name: Get pnpm store directory
3841
shell: bash
@@ -43,9 +46,9 @@ jobs:
4346
uses: actions/cache@v4
4447
with:
4548
path: ${{ env.STORE_PATH }}
46-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
49+
key: ${{ runner.os }}-pnpm-10.33.4-store-${{ hashFiles('**/pnpm-lock.yaml') }}
4750
restore-keys: |
48-
${{ runner.os }}-pnpm-store-
51+
${{ runner.os }}-pnpm-10.33.4-store-
4952
5053
- name: Install dependencies
5154
run: pnpm install --frozen-lockfile

.gitpod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ tasks:
3636
nvm install
3737
nvm use
3838
init: |
39-
npm i -g pnpm@9.14.4
39+
corepack enable
40+
corepack prepare pnpm@10.33.4 --activate
4041
pnpm install
4142
command: |
4243
cd packages/webapp

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ This is a pnpm monorepo containing the daily.dev application suite:
4141
## Technology Stack
4242

4343
- **Node.js v24.14** (see `package.json` `volta` and `packageManager` properties, also `.nvmrc`)
44-
- **pnpm 9.14.4** for package management (see `package.json` `packageManager` property)
44+
- **pnpm 10.33.4** for package management (see `package.json` `packageManager` property)
4545
- **TypeScript** across all packages
4646
- **React 18.3.1** with Next.js 15 for webapp (Pages Router, NOT App Router/Server Components)
4747
- **TanStack Query v5** for server state and data fetching
@@ -171,7 +171,8 @@ This ensures type safety, reduces duplication, and keeps types automatically in
171171
```bash
172172
# Setup
173173
nvm use # Use correct Node version from .nvmrc
174-
npm i -g pnpm@9.14.4
174+
corepack enable
175+
corepack prepare pnpm@10.33.4 --activate
175176
pnpm install
176177

177178
# Development

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN \
2222
apk --no-cache add \
2323
libc6-compat
2424

25-
RUN npm i -g pnpm
25+
RUN corepack enable && corepack prepare pnpm@10.33.4 --activate
2626
RUN pnpm install
2727

2828
COPY packages ./packages

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The decision was made to allow faster iterations and to keep features parity in
2626
## Technologies
2727

2828
- Node v24.14 (a `.nvmrc` is presented for [nvm](https://github.com/nvm-sh/nvm) users).
29-
- [pnpm](https://pnpm.io/workspaces) for managing the monorepo and dependencies.
29+
- [pnpm](https://pnpm.io/workspaces) 10.33.4 for managing the monorepo and dependencies.
3030

3131
## Projects
3232

@@ -87,10 +87,18 @@ We would appreciate if you dedicate the time and read them carefully:
8787
After cloning the project, please make sure to run the following commands to bootstrap the project:
8888

8989
```bash
90-
npm i -g pnpm@9.14.4
90+
nvm use
91+
corepack enable
92+
corepack prepare pnpm@10.33.4 --activate
9193
pnpm install
9294
```
9395

96+
## Dependency Supply-Chain Hardening
97+
98+
This repo delays newly published package versions for seven days via `minimumReleaseAge: 10080` in `pnpm-workspace.yaml`. Keep using the pinned pnpm version from `package.json`; older pnpm versions do not enforce this setting.
99+
100+
Keep `pnpm-lock.yaml` committed, use frozen-lockfile installs in CI, and avoid adding git or tarball dependencies unless they are reviewed explicitly. If an urgent dependency update must bypass the cooldown, add a temporary `minimumReleaseAgeExclude` entry in `pnpm-workspace.yaml`, review the package contents/provenance first, and remove the exception after the release ages out.
101+
94102
### Run Extension Locally
95103

96104
Example for Chrome:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test:e2e:headed": "pnpm --filter playwright test:headed",
1616
"test:e2e:ui": "pnpm --filter playwright test:ui"
1717
},
18-
"packageManager": "pnpm@9.14.4",
18+
"packageManager": "pnpm@10.33.4",
1919
"pnpm": {
2020
"patchedDependencies": {
2121
"graphql-request@3.7.0": "patches/graphql-request@3.7.0.patch"

packages/shared/src/components/Feed.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ import {
6767
briefCardFeedFeature,
6868
briefFeedEntrypointPage,
6969
featureFeedAdTemplate,
70-
featureNewD1Experience,
7170
} from '../lib/featureManagement';
71+
import { useNewD1ExperienceFeature } from '../hooks/useNewD1ExperienceFeature';
7272
import type { AwardProps } from '../graphql/njord';
7373
import { getProductsQueryOptions } from '../graphql/njord';
7474
import { useUpdateQuery } from '../hooks/useUpdateQuery';
@@ -263,8 +263,7 @@ export default function Feed<T>({
263263
feature: briefCardFeedFeature,
264264
shouldEvaluate: shouldEvaluateBriefCard,
265265
});
266-
const { value: isNewD1Experience } = useConditionalFeature({
267-
feature: featureNewD1Experience,
266+
const { value: isNewD1Experience } = useNewD1ExperienceFeature({
268267
shouldEvaluate: shouldEvaluateBriefCard,
269268
});
270269
const showBriefCard =

packages/shared/src/components/buttons/ToggleClickbaitShield.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import { useAuthContext } from '../../contexts/AuthContext';
2121
import { webappUrl } from '../../lib/constants';
2222
import { FeedSettingsMenu } from '../feeds/FeedSettings/types';
2323
import { Tooltip } from '../tooltip/Tooltip';
24-
import { useConditionalFeature } from '../../hooks/useConditionalFeature';
25-
import { featureNewD1Experience } from '../../lib/featureManagement';
24+
import { useNewD1ExperienceFeature } from '../../hooks/useNewD1ExperienceFeature';
2625

2726
export const ToggleClickbaitShield = ({
2827
origin,
@@ -41,8 +40,7 @@ export const ToggleClickbaitShield = ({
4140
const { user } = useAuthContext();
4241
const { maxTries, hasUsedFreeTrial, triesLeft } = useClickbaitTries();
4342
const isClickbaitShieldEnabled = flags?.clickbaitShieldEnabled ?? false;
44-
const { value: isNewD1Experience } = useConditionalFeature({
45-
feature: featureNewD1Experience,
43+
const { value: isNewD1Experience } = useNewD1ExperienceFeature({
4644
shouldEvaluate: !isPlus,
4745
});
4846

packages/shared/src/components/cards/common/ClickbaitShield.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ import { FeedSettingsMenu } from '../../feeds/FeedSettings/types';
1717
import { useAuthContext } from '../../../contexts/AuthContext';
1818
import { webappUrl } from '../../../lib/constants';
1919
import { Tooltip } from '../../tooltip/Tooltip';
20-
import { useConditionalFeature } from '../../../hooks/useConditionalFeature';
21-
import { featureNewD1Experience } from '../../../lib/featureManagement';
20+
import { useNewD1ExperienceFeature } from '../../../hooks/useNewD1ExperienceFeature';
2221

2322
export const ClickbaitShield = ({
2423
post,
@@ -33,8 +32,7 @@ export const ClickbaitShield = ({
3332
const router = useRouter();
3433
const { user } = useAuthContext();
3534
const { hasUsedFreeTrial, triesLeft } = useClickbaitTries();
36-
const { value: isNewD1Experience } = useConditionalFeature({
37-
feature: featureNewD1Experience,
35+
const { value: isNewD1Experience } = useNewD1ExperienceFeature({
3836
shouldEvaluate: !isPlus,
3937
});
4038

0 commit comments

Comments
 (0)