Skip to content
Open
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
3 changes: 3 additions & 0 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Corepack Enable
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Corepack Enable
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Corepack Enable
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/stories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Corepack Enable
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Corepack Enable
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -23,4 +26,4 @@ jobs:
run: yarn lint

- name: Run test
run: yarn test:ci
run: npm run test:ci
4 changes: 2 additions & 2 deletions .storybook/global.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import './reset-browser';
@import '../src/theme/style.scss';
@use './reset-browser' as *;
@use '../src/theme/style.scss' as *;
2 changes: 0 additions & 2 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const config: StorybookConfig = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
{
name: '@storybook/addon-docs',
options: {
Expand Down
4 changes: 2 additions & 2 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from '@storybook/manager-api';
import { create } from '@storybook/theming';
import { addons } from 'storybook/manager-api';
import { create } from 'storybook/theming';

addons.setConfig({
panelPosition: 'right',
Expand Down
3 changes: 1 addition & 2 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { setCompodocJson } from '@storybook/addon-docs/angular';
import type { Preview } from '@storybook/angular';
import { addons } from '@storybook/manager-api';
import { addons } from 'storybook/manager-api';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Import addons from preview API, not manager API (SB9).

In preview files, use storybook/preview-api; storybook/manager-api is for the manager UI. This prevents API/context mismatches.

Apply:

-import { addons } from 'storybook/manager-api';
+import { addons } from 'storybook/preview-api';

Supporting refs: addon API and SB9 package consolidation.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { addons } from 'storybook/manager-api';
import { addons } from 'storybook/preview-api';
🤖 Prompt for AI Agents
In .storybook/preview.ts around line 3, the file currently imports addons from
'storybook/manager-api' which is incorrect for preview files; replace that
import so it pulls addons from 'storybook/preview-api' instead, i.e. change the
import source to the preview API module to avoid manager/preview context
mismatches in Storybook 9.


import docJson from '../documentation.json';

// eslint-disable-next-line import/no-webpack-loader-syntax, import/no-unresolved
import '!style-loader!css-loader!sass-loader!./global.scss';

setCompodocJson(docJson);
Expand Down
14 changes: 7 additions & 7 deletions .storybook/reset-browser.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import '../src/theme/var';
@import '../src/theme/mixin';
@use '../src/theme/var' as var;
@use '../src/theme/mixin' as mixin;

* {
&,
Expand Down Expand Up @@ -55,8 +55,8 @@ body {
justify-content: center;
min-width: 100%;
min-height: 100%;
color: use-text-color(main);
background-color: use-rgb(n-10);
color: var.use-text-color(main);
background-color: var.use-rgb(n-10);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
Arial, 'Microsoft YaHei', sans-serif;
font-size: 14px;
Expand All @@ -71,7 +71,7 @@ code {
font-size: 14px;
line-height: 20px;
padding: 12px;
background: use-rgb(n-9);
background: var.use-rgb(n-9);
border-radius: 2px;

&[ngCodeColorize] {
Expand All @@ -83,8 +83,8 @@ input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-text-fill-color: #{use-text-color(main)} !important;
box-shadow: 0 0 0 3000px #{use-rgb(main-bg)} inset !important;
-webkit-text-fill-color: #{var.use-text-color(main)} !important;
box-shadow: 0 0 0 3000px #{var.use-rgb(main-bg)} inset !important;
}

[hidden] {
Expand Down
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
}
],
"scss/no-duplicate-dollar-variables": null,
"scss/selector-no-redundant-nesting-selector": null,
"scss/function-no-unknown": [
true,
{
Expand Down
Binary file added .yarn/install-state.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions .yarn/plugins/plugin-prepare-lifecycle.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
name: 'plugin-prepare-lifecycle',
factory: (e) => ({
hooks: {
afterAllInstalled(r) {
if (!r.topLevelWorkspace.manifest.scripts.get('prepare')) return;
e('@yarnpkg/shell').execute('yarn prepare');
},
},
}),
};
7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nodeLinker: node-modules

npmRegistryServer: "https://registry.npmmirror.com"

plugins:
- path: .yarn/plugins/plugin-prepare-lifecycle.cjs
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"
Comment on lines +5 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Third‑party Yarn plugin: pin, vendor, and assess install-time script risk

Loading a remote plugin that re-enables prepare executes arbitrary scripts during install. Ensure the plugin file is committed, the version is pinned, and scripts are disabled in CI if not required there.

Actions:

  • Keep the plugin file vendored and keep the URL for provenance, but confirm it exists and matches the intended release.
  • If CI doesn’t need prepare, set YARN_ENABLE_SCRIPTS=false in CI to reduce supply-chain risk.

Quick checks:

If you want this only for local dev, consider moving plugin loading behind a separate local rc (e.g., .yarnrc.local.yml) not committed to CI. I can draft that change.


🏁 Script executed:

#!/bin/bash
# 1) File must exist in repo
test -f .yarn/plugins/plugin-prepare-lifecycle.cjs && echo "Plugin file present" || { echo "Missing plugin file"; exit 1; }

# 2) Confirm spec is pinned to an exact tag
yq '.plugins[] | select(.path==".yarn/plugins/plugin-prepare-lifecycle.cjs") | .spec' .yarnrc.yml

# 3) Optional: record checksum for audit logs
shasum -a 256 .yarn/plugins/plugin-prepare-lifecycle.cjs

Length of output: 450


🏁 Script executed:

#!/bin/bash
# 1) Verify plugin file present
if test -f .yarn/plugins/plugin-prepare-lifecycle.cjs; then
  echo "Plugin file present"
else
  echo "Missing plugin file"
  exit 1
fi

# 2) Confirm spec pinned in .yarnrc.yml
grep -nP '^\s*spec:\s*".*"' .yarnrc.yml | grep 'plugin-prepare-lifecycle.cjs' \
  && echo "Spec is pinned" \
  || { echo "Spec not pinned or missing"; exit 1; }

# 3) Compute SHA-256 checksum of the plugin file
if command -v sha256sum >/dev/null; then
  sha256sum .yarn/plugins/plugin-prepare-lifecycle.cjs
elif command -v openssl >/dev/null; then
  openssl dgst -sha256 .yarn/plugins/plugin-prepare-lifecycle.cjs
else
  echo "No checksum tool available"
  exit 1
fi

Length of output: 251


🏁 Script executed:

#!/bin/bash
# 1) Display the plugin block with spec for manual verification
sed -n -e '/- path: \.yarn\/plugins\/plugin-prepare-lifecycle\.cjs/,+2p' .yarnrc.yml

# 2) Compute SHA-256 checksum of the vendored plugin file
if command -v sha256sum >/dev/null; then
  sha256sum .yarn/plugins/plugin-prepare-lifecycle.cjs
elif command -v openssl >/dev/null; then
  openssl dgst -sha256 .yarn/plugins/plugin-prepare-lifecycle.cjs
else
  echo "Error: no checksum tool available" >&2
  exit 1
fi

Length of output: 370


Record checksum and disable install-time scripts in CI

  • Plugin is vendored at .yarn/plugins/plugin-prepare-lifecycle.cjs and spec is pinned to v0.0.1.
  • Generate and commit the SHA-256 checksum of the vendored file (e.g. sha256sum .yarn/plugins/plugin-prepare-lifecycle.cjs) for provenance auditing.
  • In CI, if you don’t rely on prepare, disable install-time scripts by setting YARN_ENABLE_SCRIPTS=false.
🤖 Prompt for AI Agents
In .yarnrc.yml around lines 5–7, the vendored plugin at
.yarn/plugins/plugin-prepare-lifecycle.cjs is pinned to v0.0.1 but has no
recorded checksum and CI may run install-time scripts; generate a SHA-256
checksum for the vendored file (e.g. sha256sum
.yarn/plugins/plugin-prepare-lifecycle.cjs), commit that checksum alongside the
file (or add it to a provenance/checksums file in the repo), and update your CI
configuration to set YARN_ENABLE_SCRIPTS=false during installs unless the
pipeline explicitly requires prepare lifecycle scripts.

Loading
Loading