-
Notifications
You must be signed in to change notification settings - Fork 802
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
318 changed files
with
3,614 additions
and
4,335 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/js-packages/ai-client/changelog/fix-jetpack-ai-first-logo-generation-style
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: fixed | ||
|
||
AI Client: add style parameter to first logo generator so it doesn't fall in a dall-e situation |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
projects/js-packages/charts/changelog/renovate-storybook-monorepo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Significance: patch | ||
Type: changed | ||
|
||
Updated package dependencies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
// Import necessary plugins for building the library | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
import json from '@rollup/plugin-json'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import terser from '@rollup/plugin-terser'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
import { defineConfig } from 'rollup'; | ||
import dts from 'rollup-plugin-dts'; | ||
import peerDepsExternal from 'rollup-plugin-peer-deps-external'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
|
||
// Common plugins used across all build configurations | ||
const commonPlugins = [ | ||
// Automatically externalize peer dependencies | ||
peerDepsExternal( { | ||
includeDependencies: true, | ||
} ), | ||
// Locate and bundle third-party dependencies from node_modules | ||
resolve( { | ||
preferBuiltins: true, | ||
extensions: [ '.tsx', '.ts', '.js', '.jsx' ], | ||
} ), | ||
// Convert CommonJS modules to ES6 | ||
commonjs(), | ||
// Allow importing JSON files | ||
json(), | ||
// Process SCSS/CSS modules | ||
postcss( { | ||
// Configure CSS modules with scoped names | ||
modules: { | ||
generateScopedName: '[name]__[local]__[hash:base64:5]', | ||
}, | ||
extract: 'style.css', | ||
autoModules: false, | ||
use: [ 'sass' ], | ||
} ), | ||
]; | ||
|
||
// Main bundle configuration for the entire library | ||
const mainConfig = { | ||
// Entry point for the bundle | ||
input: 'src/index.ts', | ||
// Output configuration for different module formats | ||
output: [ | ||
{ | ||
file: './dist/index.js', | ||
format: 'cjs', // CommonJS format for Node.js | ||
sourcemap: true, | ||
sourcemapPathTransform: relativeSourcePath => { | ||
return `/@automattic/charts/${ relativeSourcePath }`; | ||
}, | ||
}, | ||
{ | ||
file: './dist/index.mjs', | ||
format: 'esm', // ES modules for modern bundlers | ||
sourcemap: true, | ||
}, | ||
], | ||
// Mark all dependencies as external to avoid bundling them | ||
external: [ 'react', 'react-dom', /^@visx\/.*/, '@react-spring/web', 'clsx', 'tslib' ], | ||
plugins: [ | ||
...commonPlugins, | ||
// TypeScript compilation | ||
typescript( { | ||
tsconfig: './tsconfig.json', | ||
declaration: false, // Declarations handled by dts plugin | ||
sourceMap: true, | ||
compilerOptions: { | ||
verbatimModuleSyntax: true, | ||
}, | ||
} ), | ||
terser(), | ||
], | ||
// Handle circular dependencies warning | ||
onwarn( warning, warn ) { | ||
if ( warning.code === 'CIRCULAR_DEPENDENCY' ) { | ||
return; | ||
} | ||
warn( warning ); | ||
}, | ||
}; | ||
|
||
// List of components to build individually | ||
const components = [ | ||
'components/bar-chart', | ||
'components/line-chart', | ||
'components/pie-chart', | ||
'components/pie-semi-circle-chart', | ||
'components/tooltip', | ||
'components/legend', | ||
'components/grid-control', | ||
'providers/theme', | ||
]; | ||
|
||
// Generate individual bundles for each component | ||
const componentConfigs = components.map( component => ( { | ||
// Component entry point - try both .tsx and .ts extensions | ||
input: `src/${ component }/index`, | ||
// Output both ESM and CJS formats | ||
output: [ | ||
{ | ||
file: `dist/${ component }/index.js`, | ||
format: 'esm', | ||
sourcemap: true, | ||
}, | ||
{ | ||
file: `dist/${ component }/index.cjs.js`, | ||
format: 'cjs', | ||
sourcemap: true, | ||
}, | ||
], | ||
// Same external config as main bundle | ||
external: [ 'react', 'react-dom', /^@visx\/.*/, '@react-spring/web', 'clsx', 'tslib' ], | ||
plugins: [ | ||
...commonPlugins, | ||
typescript( { | ||
tsconfig: './tsconfig.json', | ||
declaration: false, | ||
sourceMap: true, | ||
compilerOptions: { | ||
verbatimModuleSyntax: true, | ||
}, | ||
} ), | ||
terser(), | ||
], | ||
} ) ); | ||
|
||
// Configuration for generating TypeScript declaration files | ||
const typesConfig = { | ||
input: 'src/index.ts', | ||
output: [ { file: 'dist/index.d.ts', format: 'es' } ], | ||
plugins: [ | ||
dts( { | ||
respectExternal: true, | ||
} ), | ||
], | ||
// Don't include style imports in type definitions | ||
external: [ /\.scss$/, /\.css$/, 'react', '@types/react' ], | ||
}; | ||
|
||
// Export all configurations to be built in parallel | ||
export default defineConfig( [ mainConfig, ...componentConfigs, typesConfig ] ); |
Oops, something went wrong.