Skip to content

Commit

Permalink
Merge branch 'v11' into ch-schema-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Sep 25, 2024
2 parents c75b989 + 36cb017 commit 5d5c425
Show file tree
Hide file tree
Showing 110 changed files with 702 additions and 1,403 deletions.
36 changes: 36 additions & 0 deletions .changeset/little-cows-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
'@firebase/installations-compat': patch
'@firebase/remote-config-compat': patch
'@firebase/performance-compat': patch
'@firebase/rules-unit-testing': patch
'@firebase/webchannel-wrapper': patch
'@firebase/analytics-compat': patch
'@firebase/app-check-compat': patch
'@firebase/firestore-compat': patch
'@firebase/functions-compat': patch
'@firebase/messaging-compat': patch
'@firebase/database-compat': patch
'@firebase/storage-compat': patch
'@firebase/installations': patch
'@firebase/remote-config': patch
'@firebase/auth-compat': patch
'@firebase/performance': patch
'@firebase/app-compat': patch
'@firebase/analytics': patch
'@firebase/app-check': patch
'@firebase/component': patch
'@firebase/firestore': patch
'@firebase/functions': patch
'@firebase/messaging': patch
'@firebase/database': patch
'firebase': patch
'@firebase/template': patch
'@firebase/vertexai-preview': patch
'@firebase/storage': patch
'@firebase/logger': patch
'@firebase/auth': patch
'@firebase/util': patch
'@firebase/app': patch
---

Remove ES5 bundles. The minimum required ES version is now ES2017.
29 changes: 7 additions & 22 deletions common/api-review/vertexai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export interface BaseParams {

// @public
export enum BlockReason {
// (undocumented)
BLOCKED_REASON_UNSPECIFIED = "BLOCKED_REASON_UNSPECIFIED",
// (undocumented)
OTHER = "OTHER",
// (undocumented)
Expand Down Expand Up @@ -159,8 +157,6 @@ export interface FileDataPart {

// @public
export enum FinishReason {
// (undocumented)
FINISH_REASON_UNSPECIFIED = "FINISH_REASON_UNSPECIFIED",
// (undocumented)
MAX_TOKENS = "MAX_TOKENS",
// (undocumented)
Expand Down Expand Up @@ -196,8 +192,6 @@ export enum FunctionCallingMode {
// (undocumented)
AUTO = "AUTO",
// (undocumented)
MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
// (undocumented)
NONE = "NONE"
}

Expand All @@ -215,7 +209,7 @@ export interface FunctionCallPart {

// @public
export interface FunctionDeclaration {
description?: string;
description: string;
name: string;
parameters?: ObjectSchemaInterface;
}
Expand Down Expand Up @@ -381,8 +375,6 @@ export interface GroundingMetadata {

// @public (undocumented)
export enum HarmBlockMethod {
// (undocumented)
HARM_BLOCK_METHOD_UNSPECIFIED = "HARM_BLOCK_METHOD_UNSPECIFIED",
// (undocumented)
PROBABILITY = "PROBABILITY",
// (undocumented)
Expand All @@ -398,9 +390,7 @@ export enum HarmBlockThreshold {
// (undocumented)
BLOCK_NONE = "BLOCK_NONE",
// (undocumented)
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH",
// (undocumented)
HARM_BLOCK_THRESHOLD_UNSPECIFIED = "HARM_BLOCK_THRESHOLD_UNSPECIFIED"
BLOCK_ONLY_HIGH = "BLOCK_ONLY_HIGH"
}

// @public
Expand All @@ -412,15 +402,11 @@ export enum HarmCategory {
// (undocumented)
HARM_CATEGORY_HATE_SPEECH = "HARM_CATEGORY_HATE_SPEECH",
// (undocumented)
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT",
// (undocumented)
HARM_CATEGORY_UNSPECIFIED = "HARM_CATEGORY_UNSPECIFIED"
HARM_CATEGORY_SEXUALLY_EXPLICIT = "HARM_CATEGORY_SEXUALLY_EXPLICIT"
}

// @public
export enum HarmProbability {
// (undocumented)
HARM_PROBABILITY_UNSPECIFIED = "HARM_PROBABILITY_UNSPECIFIED",
// (undocumented)
HIGH = "HIGH",
// (undocumented)
Expand All @@ -440,9 +426,7 @@ export enum HarmSeverity {
// (undocumented)
HARM_SEVERITY_MEDIUM = "HARM_SEVERITY_MEDIUM",
// (undocumented)
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE",
// (undocumented)
HARM_SEVERITY_UNSPECIFIED = "HARM_SEVERITY_UNSPECIFIED"
HARM_SEVERITY_NEGLIGIBLE = "HARM_SEVERITY_NEGLIGIBLE"
}

// @public
Expand Down Expand Up @@ -512,7 +496,7 @@ export const POSSIBLE_ROLES: readonly ["user", "model", "function", "system"];
// @public
export interface PromptFeedback {
// (undocumented)
blockReason: BlockReason;
blockReason?: BlockReason;
// (undocumented)
blockReasonMessage?: string;
// (undocumented)
Expand Down Expand Up @@ -687,7 +671,7 @@ export type Tool = FunctionDeclarationsTool;
// @public
export interface ToolConfig {
// (undocumented)
functionCallingConfig: FunctionCallingConfig;
functionCallingConfig?: FunctionCallingConfig;
}

// @public
Expand Down Expand Up @@ -721,6 +705,7 @@ export class VertexAIError extends FirebaseError {

// @public
export const enum VertexAIErrorCode {
API_NOT_ENABLED = "api-not-enabled",
ERROR = "error",
FETCH_ERROR = "fetch-error",
INVALID_CONTENT = "invalid-content",
Expand Down
14 changes: 3 additions & 11 deletions config/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,16 @@
"importHelpers": true,
"strict": true,
"lib": [
"es5",
"dom",
"es2015.promise",
"es2015.symbol",
"es2015.iterable",
"es2015.collection",
"es2015.symbol.wellknown",
"es2015.core",
"es2017.object",
"es2017.string",
"ESNext.WeakRef",
"es2017",
"esnext.WeakRef",
],
"module": "ES2015",
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"sourceMap": true,
"target": "es5",
"target": "es2017",
"typeRoots": [
"../node_modules/@types"
],
Expand Down
2 changes: 1 addition & 1 deletion e2e/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = function (config) {
'resolveJsonModule': true,
'esModuleInterop': true,
'sourceMap': true,
'target': 'es5',
'target': 'es2017',
'importHelpers': true,
'noEmitOnError': true
}
Expand Down
2 changes: 1 addition & 1 deletion integration/compat-interop/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "node",
"noImplicitAny": true,
"outDir": "dist",
"target": "ES5",
"target": "es2017",
"sourceMap": true,
"esModuleInterop": true
},
Expand Down
2 changes: 1 addition & 1 deletion integration/firebase/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"moduleResolution": "node",
"noImplicitAny": true,
"outDir": "dist",
"target": "ES5",
"target": "es2017",
"sourceMap": true,
"esModuleInterop": true
},
Expand Down
2 changes: 0 additions & 2 deletions packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
"main": "dist/index.cjs.js",
"browser": "dist/esm/index.esm2017.js",
"module": "dist/esm/index.esm2017.js",
"esm5": "dist/esm/index.esm.js",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"require": "./dist/index.cjs.js",
"esm5": "./dist/esm/index.esm.js",
"default": "./dist/esm/index.esm2017.js"
},
"./package.json": "./package.json"
Expand Down
60 changes: 21 additions & 39 deletions packages/analytics-compat/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,51 +25,33 @@ const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);

const es5BuildPlugins = [
const buildPlugins = [
typescriptPlugin({
typescript
}),
json()
];

const es2017BuildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
compilerOptions: {
target: 'es2017'
}
}
}),
json({ preferConst: true })
];

const esmBuilds = [
{
input: 'src/index.ts',
output: {
file: pkg.browser,
format: 'es',
sourcemap: true
},
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [...es2017BuildPlugins, emitModulePackageFile()]
const esmBuild = {
input: 'src/index.ts',
output: {
file: pkg.browser,
format: 'es',
sourcemap: true
},
{
input: 'src/index.ts',
output: { file: pkg.esm5, format: 'es', sourcemap: true },
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [...es5BuildPlugins, emitModulePackageFile()]
}
];
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [...buildPlugins, emitModulePackageFile()]
};

const cjsBuilds = [
{
input: 'src/index.ts',
output: { file: pkg.main, format: 'cjs', sourcemap: true },
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: es5BuildPlugins
}
];
const cjsBuild = {
input: 'src/index.ts',
output: {
file: pkg.main,
format: 'cjs',
sourcemap: true
},
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: buildPlugins
};

export default [...esmBuilds, ...cjsBuilds];
export default [esmBuild, cjsBuild];
2 changes: 0 additions & 2 deletions packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
"main": "dist/index.cjs.js",
"browser": "dist/esm/index.esm2017.js",
"module": "dist/esm/index.esm2017.js",
"esm5": "dist/esm/index.esm.js",
"exports": {
".": {
"types": "./dist/analytics-public.d.ts",
"require": "./dist/index.cjs.js",
"esm5": "./dist/esm/index.esm.js",
"default": "./dist/esm/index.esm2017.js"
},
"./package.json": "./package.json"
Expand Down
36 changes: 9 additions & 27 deletions packages/analytics/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,39 +27,17 @@ const deps = [
...Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies))
];

const es5BuildPlugins = [
const buildPlugins = [
typescriptPlugin({
typescript
}),
json()
];

const es2017BuildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
compilerOptions: {
target: 'es2017'
}
}
}),
json({ preferConst: true })
];

/**
* ESM builds
*/
const esmBuilds = [
{
input: 'src/index.ts',
output: [{ file: pkg.esm5, format: 'es', sourcemap: true }],
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [
...es5BuildPlugins,
replace(generateBuildTargetReplaceConfig('esm', 5)),
emitModulePackageFile()
]
},
{
input: 'src/index.ts',
output: {
Expand All @@ -69,7 +47,7 @@ const esmBuilds = [
},
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [
...es2017BuildPlugins,
...buildPlugins,
replace(generateBuildTargetReplaceConfig('esm', 2017)),
emitModulePackageFile()
]
Expand All @@ -82,11 +60,15 @@ const esmBuilds = [
const cjsBuilds = [
{
input: 'src/index.ts',
output: [{ file: pkg.main, format: 'cjs', sourcemap: true }],
output: {
file: pkg.main,
format: 'cjs',
sourcemap: true
},
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`)),
plugins: [
...es5BuildPlugins,
replace(generateBuildTargetReplaceConfig('cjs', 5))
...buildPlugins,
replace(generateBuildTargetReplaceConfig('cjs', 2017))
]
}
];
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function registerAnalytics(): void {
);

registerVersion(name, version);
// BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation
// BUILD_TARGET will be replaced by values like esm2017, cjs2017, etc during the compilation
registerVersion(name, version, '__BUILD_TARGET__');

function internalFactory(
Expand Down
2 changes: 0 additions & 2 deletions packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@
"main": "dist/index.cjs.js",
"browser": "dist/esm/index.esm2017.js",
"module": "dist/esm/index.esm2017.js",
"esm5": "dist/esm/index.esm.js",
"exports": {
".": {
"types": "./dist/src/index.d.ts",
"require": "./dist/index.cjs.js",
"esm5": "./dist/esm/index.esm.js",
"default": "./dist/esm/index.esm2017.js"
},
"./package.json": "./package.json"
Expand Down
Loading

0 comments on commit 5d5c425

Please sign in to comment.