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
2 changes: 1 addition & 1 deletion .github/actions/setup-nx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ runs:
id: setup_node
uses: actions/setup-node@v4
with:
node-version: '22'
node-version-file: package.json

- name: yarn install
if: inputs.cache_mode == 'rw' && inputs.yarn_postinstall == 'true'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ jobs:
with:
fetch-depth: 1 # shallow copy

- name: Verify rulesync configuration
run: ./external/ag-shared/scripts/sync-rulesync/sync-rulesync.sh --check

- name: Setup
id: setup
uses: ./.github/actions/setup-nx
Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/module-size-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,37 @@ jobs:
if: needs.prepare.outputs.is-draft != 'true'
outputs:
cache-hit: ${{ steps.cache-check.outputs.cache-hit }}
base-sha: ${{ steps.get-sha.outputs.sha }}
base-sha: ${{ steps.get-merge-base.outputs.sha }}
steps:
- name: Get base branch SHA
id: get-sha
- name: Checkout to find merge base
uses: actions/checkout@v4
with:
ref: ${{ needs.prepare.outputs.head-sha }}
fetch-depth: 0

- name: Get merge base SHA
id: get-merge-base
run: |
BASE_REF="${{ needs.prepare.outputs.base-ref }}"
SHA=$(git ls-remote https://github.com/${{ github.repository }} refs/heads/${BASE_REF} | cut -f1)
echo "sha=${SHA}" >> $GITHUB_OUTPUT
echo "Base branch (${BASE_REF}) SHA: ${SHA}"
HEAD_SHA="${{ needs.prepare.outputs.head-sha }}"

# Fetch the base branch
git fetch origin ${BASE_REF}

# Find the merge base (common ancestor)
MERGE_BASE=$(git merge-base origin/${BASE_REF} ${HEAD_SHA})

echo "sha=${MERGE_BASE}" >> $GITHUB_OUTPUT
echo "Base branch: ${BASE_REF}"
echo "PR head: ${HEAD_SHA}"
echo "Merge base SHA: ${MERGE_BASE}"

- name: Check cache for base results
id: cache-check
uses: actions/cache/restore@v4
with:
path: ./base-results.json
key: module-size-base-${{ steps.get-sha.outputs.sha }}
key: module-size-base-${{ steps.get-merge-base.outputs.sha }}
lookup-only: true

# Build and run module size tests on the PR branch (sharded)
Expand Down Expand Up @@ -136,7 +151,7 @@ jobs:
artifact-prefix: module-size-pr
artifact-suffix: ${{ needs.prepare.outputs.pr-number }}

# Build and run module size tests on the base branch (sharded) - only if cache miss
# Build and run module size tests on the merge base (sharded) - only if cache miss
module-size-base:
name: Module Size Base (${{ matrix.shard }}/${{ strategy.job-total }})
runs-on: ubuntu-latest
Expand All @@ -156,7 +171,7 @@ jobs:
- name: Run module size tests
uses: ./.github/actions/module-size-test
with:
ref: ${{ needs.prepare.outputs.base-ref }}
ref: ${{ needs.check-base-cache.outputs.base-sha }}
shard: ${{ matrix.shard }}
total-shards: ${{ strategy.job-total }}
artifact-prefix: module-size-base
Expand Down
9 changes: 9 additions & 0 deletions .nxignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
# Needed to avoid nx format failing on symlinks.
.rulesync/
.patches/
patches/

# Files without Prettier parsers
*.sh
*.patch
.gitrepo
.nxignore
.prettierignore
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,12 @@ testing/ag-grid-docs/test-results/
testing/angular-package-tests/project.base.json

documentation/ag-grid-docs/src/components/ZoomInfo.astro

# Files without Prettier parsers
*.patch
*.sh
.gitrepo
.nxignore

# External subrepo (managed separately)
external/ag-shared/
16 changes: 2 additions & 14 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
extends: 'stylelint-config-standard',
plugins: ['./plugins/stylelint-plugin-ag/index.mjs'],
rules: {
'ag/no-low-performance-key-selector': true,
'comment-empty-line-before': [
'always',
{
Expand Down Expand Up @@ -48,19 +50,5 @@ module.exports = {
],
},
],

// NOTE: In general we want to avoid targeting grid elements using
// [class^='ag-'] as customer applications can have elements with that
// prefix too. Sometimes it is unavoidable, e.g. for global style
// resets, in which case scope the selector so it is only applied within
// the grid root.
'selector-disallowed-list': [
['/.*class\\^=.*/'],
{
message:
'Avoid selectors that target partial classnames unless absolutely necessary - see note in .stylelintrc.js',
severity: 'error',
},
],
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@
}

.ag-formula-token-color-7 {
color: var(--ag-formula-token-6-color);
color: var(--ag-formula-token-7-color);
}

.ag-formula-range-color-1 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,21 @@

--ag-cell-batch-edit-text-color: #f3d0b3;

--ag-formula-token-1-color: #4da3e5;
--ag-formula-token-1-background-color: rgb(77 163 229 / 16%);
--ag-formula-token-2-color: #f55864;
--ag-formula-token-2-background-color: rgb(245 88 100 / 16%);
--ag-formula-token-3-color: #b688f2;
--ag-formula-token-3-background-color: rgb(182 136 242 / 16%);
--ag-formula-token-4-color: #24bb4a;
--ag-formula-token-4-background-color: rgb(36 187 74 / 16%);
--ag-formula-token-5-color: #e772ba;
--ag-formula-token-5-background-color: rgb(231 114 186 / 16%);
--ag-formula-token-6-color: #f69b5f;
--ag-formula-token-6-background-color: rgb(246 155 95 / 16%);
--ag-formula-token-7-color: #a3e6ff;
--ag-formula-token-7-background-color: rgb(163 230 255 / 16%);

color-scheme: dark;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@

--ag-cell-batch-edit-text-color: #f3d0b3;

--ag-formula-token-1-color: #4da3e5;
--ag-formula-token-1-background-color: rgb(77 163 229 / 16%);
--ag-formula-token-2-color: #f55864;
--ag-formula-token-2-background-color: rgb(245 88 100 / 16%);
--ag-formula-token-3-color: #b688f2;
--ag-formula-token-3-background-color: rgb(182 136 242 / 16%);
--ag-formula-token-4-color: #24bb4a;
--ag-formula-token-4-background-color: rgb(36 187 74 / 16%);
--ag-formula-token-5-color: #e772ba;
--ag-formula-token-5-background-color: rgb(231 114 186 / 16%);
--ag-formula-token-6-color: #f69b5f;
--ag-formula-token-6-background-color: rgb(246 155 95 / 16%);
--ag-formula-token-7-color: #a3e6ff;
--ag-formula-token-7-background-color: rgb(163 230 255 / 16%);

color-scheme: dark;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,21 @@

--ag-cell-batch-edit-text-color: #f3d0b3;

--ag-formula-token-1-color: #4da3e5;
--ag-formula-token-1-background-color: rgb(77 163 229 / 16%);
--ag-formula-token-2-color: #f55864;
--ag-formula-token-2-background-color: rgb(245 88 100 / 16%);
--ag-formula-token-3-color: #b688f2;
--ag-formula-token-3-background-color: rgb(182 136 242 / 16%);
--ag-formula-token-4-color: #24bb4a;
--ag-formula-token-4-background-color: rgb(36 187 74 / 16%);
--ag-formula-token-5-color: #e772ba;
--ag-formula-token-5-background-color: rgb(231 114 186 / 16%);
--ag-formula-token-6-color: #f69b5f;
--ag-formula-token-6-background-color: rgb(246 155 95 / 16%);
--ag-formula-token-7-color: #a3e6ff;
--ag-formula-token-7-background-color: rgb(163 230 255 / 16%);

color-scheme: dark;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,21 @@

--ag-cell-batch-edit-text-color: #f3d0b3;

--ag-formula-token-1-color: #4da3e5;
--ag-formula-token-1-background-color: rgb(77 163 229 / 16%);
--ag-formula-token-2-color: #f55864;
--ag-formula-token-2-background-color: rgb(245 88 100 / 16%);
--ag-formula-token-3-color: #b688f2;
--ag-formula-token-3-background-color: rgb(182 136 242 / 16%);
--ag-formula-token-4-color: #24bb4a;
--ag-formula-token-4-background-color: rgb(36 187 74 / 16%);
--ag-formula-token-5-color: #e772ba;
--ag-formula-token-5-background-color: rgb(231 114 186 / 16%);
--ag-formula-token-6-color: #f69b5f;
--ag-formula-token-6-background-color: rgb(246 155 95 / 16%);
--ag-formula-token-7-color: #a3e6ff;
--ag-formula-token-7-background-color: rgb(163 230 255 / 16%);

color-scheme: dark;
}

Expand Down
6 changes: 6 additions & 0 deletions documentation/ag-grid-docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { loadEnv } from 'vite';
import mkcert from 'vite-plugin-mkcert';
import svgr from 'vite-plugin-svgr';

import agCacheSitemap from '../../external/ag-website-shared/plugins/agCacheSitemap';
import agLinkChecker from '../../external/ag-website-shared/plugins/agLinkChecker';
import { SITEMAP_CACHE_DIR } from '../../external/ag-website-shared/src/constants';
import buildTime from './plugins/agBuildTime';
import agHotModuleReload from './plugins/agHotModuleReload';
import agHtaccessGen from './plugins/agHtaccessGen';
Expand Down Expand Up @@ -203,5 +205,9 @@ export default defineConfig({
skip: CHECK_REDIRECTS !== 'true',
}),
agLinkChecker({ include: CHECK_LINKS === 'true' }),

agCacheSitemap({
cacheFolder: SITEMAP_CACHE_DIR,
}),
],
});
18 changes: 14 additions & 4 deletions documentation/ag-grid-docs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,28 @@
"!{projectRoot}/vitest.config.ts",
"{workspaceRoot}/external/ag-website-shared/**",
"charts",
"{projectRoot}/.astro/cache/sitemap/**",
{ "env": "PUBLIC_PACKAGE_VERSION" }
],
"cache": true,
"command": "astro build",
"command": "tsx ../../external/ag-website-shared/scripts/buildWithSitemapCache.ts",
"options": {
"cwd": "{projectRoot}",
"silent": true
},
"configurations": {
"staging": {},
"archive": {},
"production": {},
"staging": {
"silent": true,
"clean-cache": true
},
"archive": {
"silent": true,
"clean-cache": true
},
"production": {
"silent": true,
"clean-cache": true
},
"verbose": {
"silent": null
}
Expand Down
1 change: 1 addition & 0 deletions documentation/ag-grid-docs/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const SITE_URL = import.meta.env?.SITE_URL || import.meta.env?.PUBLIC_SIT

export const STAGING_SITE_URL = 'https://grid-staging.ag-grid.com';
export const PRODUCTION_SITE_URLS = ['https://ag-grid.com', 'https://www.ag-grid.com'];
export const PRODUCTION_SITE_URL = PRODUCTION_SITE_URLS[0];
export const USE_PUBLISHED_PACKAGES = isTruthy(import.meta.env?.PUBLIC_USE_PUBLISHED_PACKAGES);

export const URL_CONFIG: Record<'local' | 'staging' | 'production', { hosts: string[]; baseUrl?: string }> = {
Expand Down
9 changes: 4 additions & 5 deletions documentation/ag-grid-docs/src/pages/debug/meta.json.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { getGitDate, getGitHash, getGitShortHash } from '@ag-website-shared/utils/gitUtils';
import { SITE_BASE_URL, SITE_URL, agChartsVersion, agGridVersion } from '@constants';
import { getIsArchive, getIsDev, getIsProduction, getIsStaging } from '@utils/env';
import { execSync } from 'child_process';

export async function GET() {
const removeNewlineRegex = /\n/gm;
const buildDate = new Date();
const hash = execSync('git rev-parse HEAD').toString().replace(removeNewlineRegex, '');
const shortHash = execSync('git rev-parse --short HEAD').toString().replace(removeNewlineRegex, '');
const gitDate = execSync('git --no-pager log -1 --format="%ai"').toString().replace(removeNewlineRegex, '');
const hash = getGitHash();
const shortHash = getGitShortHash();
const gitDate = getGitDate();

const body = {
buildDate,
Expand Down
11 changes: 9 additions & 2 deletions documentation/ag-grid-docs/src/pages/sitemap.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
---
import { Sitemap } from '@ag-website-shared/components/sitemap/Sitemap';
import parseSitemap from '@ag-website-shared/components/sitemap/utils/sitemaputils';
import { getSitemapXml } from '@ag-website-shared/utils/getSitemapXml';
import Layout from '../layouts/Layout.astro';
import { PRODUCTION_SITE_URL } from '@constants';
import { SITEMAP_CACHE_DIR } from '@ag-website-shared/constants';

const sitemapUrl = `${PRODUCTION_SITE_URL.replace(/\/$/, '')}/sitemap-0.xml`;
const xmlSitemap = await getSitemapXml({
cacheDir: SITEMAP_CACHE_DIR,
sitemapUrl,
});

const response = await fetch('https://www.ag-grid.com/sitemap-0.xml');
const xmlSitemap = await response.text();
const parsedSitemap = parseSitemap(xmlSitemap);
---

Expand Down
7 changes: 6 additions & 1 deletion documentation/ag-grid-docs/src/utils/sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ const isRedirectPage = (page: string) => {
* Exclude specific pages
*/
const isNonPublicContent = (page: string) => {
return page.endsWith('/style-guide/');
return (
page.endsWith('/style-guide/') ||
// Contact form result pages
page.endsWith('/contact/failure/') ||
page.endsWith('/contact/success/')
);
};

const filterIgnoredPages = (page: string) => {
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default [
// cypress uses a global API based on undefined variables
files: [
'**/*.spec.{ts,js}',
'**/*test.{ts,js}',
'**/*test.{ts,js,mjs}',
'**/{cypress,_copiedFromCore,__tests__}/**',
'**/test-utils/**',
],
Expand Down
4 changes: 2 additions & 2 deletions external/ag-shared/.gitrepo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[subrepo]
remote = https://github.com/ag-grid/ag-shared.git
branch = latest
commit = 7e82fede2e46b228b3c52cfacab0df9b2cb02280
parent = d16b9c9641036859f0ee644391ae24dec213125e
commit = fc38ac749175313716cfbfd346a7df38180efe23
parent = b2a4da53d795941a12728417fd5d7032ba92b99b
method = rebase
cmdver = 0.4.9
Loading
Loading