Skip to content

Commit

Permalink
changes for rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 committed Jan 27, 2025
1 parent c7e909c commit 03d26e6
Show file tree
Hide file tree
Showing 59 changed files with 147 additions and 164 deletions.
2 changes: 1 addition & 1 deletion config/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
*
* DEFAULT VALUE: false
*/
// "skipLibCheck": true,
"skipLibCheck": true,
},

/**
Expand Down
6 changes: 2 additions & 4 deletions packages/analytics-compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/analytics-interop-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/analytics-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
6 changes: 5 additions & 1 deletion packages/analytics/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,18 @@ import typescript from 'typescript';
import { generateBuildTargetReplaceConfig } from '../../scripts/build/rollup_replace_build_target';
import { emitModulePackageFile } from '../../scripts/build/rollup_emit_module_package_file';
import pkg from './package.json';
import tsconfig from './tsconfig.json';

const deps = [
...Object.keys(Object.assign({}, pkg.peerDependencies, pkg.dependencies))
];

const buildPlugins = [
typescriptPlugin({
typescript
typescript,
tsconfigOverride: {
exclude: [...tsconfig.exclude, '**/*.test.ts']
}
}),
json({ preferConst: true })
];
Expand Down
4 changes: 1 addition & 3 deletions packages/app-check-interop-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/app-check-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/app-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
6 changes: 5 additions & 1 deletion packages/app/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,18 @@ import dts from 'rollup-plugin-dts';
import { generateBuildTargetReplaceConfig } from '../../scripts/build/rollup_replace_build_target';
import { emitModulePackageFile } from '../../scripts/build/rollup_emit_module_package_file';
import pkg from './package.json';
import tsconfig from './tsconfig.json';

const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);

const buildPlugins = [
typescriptPlugin({
typescript
typescript,
tsconfigOverride: {
exclude: [...tsconfig.exclude, '**/*.test.ts']
}
}),
json({ preferConst: true })
];
Expand Down
6 changes: 2 additions & 4 deletions packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
"outDir": "dist",
"downlevelIteration": true
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
6 changes: 2 additions & 4 deletions packages/auth-compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/auth-interop-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/auth-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
7 changes: 6 additions & 1 deletion packages/auth/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import alias from '@rollup/plugin-alias';
import { generateBuildTargetReplaceConfig } from '../../scripts/build/rollup_replace_build_target';
import { emitModulePackageFile } from '../../scripts/build/rollup_emit_module_package_file';
import pkg from './package.json';
import tsconfig from './tsconfig.json';

const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
Expand All @@ -47,7 +48,10 @@ const nodeAliasPlugin = alias({
const buildPlugins = [
json(),
strip({ functions: ['debugAssert.*'] }),
typescriptPlugin({ typescript })
typescriptPlugin({
typescript,
tsconfigOverride: { exclude: [...tsconfig.exclude, '**/*.test.ts'] }
})
];

const browserBuilds = [
Expand Down Expand Up @@ -191,6 +195,7 @@ const webWorkerBuild = {
}),
typescriptPlugin({
typescript,
exclude: [...tsconfig.exclude, '**/*.test.*'],
compilerOptions: {
lib: [
// Remove dom after we figure out why navigator stuff doesn't exist
Expand Down
7 changes: 2 additions & 5 deletions packages/auth/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"exclude": [
"dist/**/*",
"demo/**/*"
]
}
"exclude": ["dist/**/*", "demo/**/*"]
}
10 changes: 9 additions & 1 deletion packages/component/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ import typescriptPlugin from 'rollup-plugin-typescript2';
import typescript from 'typescript';
import { emitModulePackageFile } from '../../scripts/build/rollup_emit_module_package_file';
import pkg from './package.json';
import tsconfig from './tsconfig.json';

const deps = Object.keys(
Object.assign({}, pkg.peerDependencies, pkg.dependencies)
);

const buildPlugins = [typescriptPlugin({ typescript })];
const buildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
exclude: [...tsconfig.exclude, '**/*.test.ts']
}
})
];

const esmBuild = {
input: 'index.ts',
Expand Down
6 changes: 3 additions & 3 deletions packages/component/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,15 +319,15 @@ export class Provider<T extends Name> {
instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),
options
});
this.instances.set(instanceIdentifier, instance);
this.instances.set(instanceIdentifier, instance!);
this.instancesOptions.set(instanceIdentifier, options);

/**
* Invoke onInit listeners.
* Note this.component.onInstanceCreated is different, which is used by the component creator,
* while onInit listeners are registered by consumers of the provider.
*/
this.invokeOnInitCallbacks(instance, instanceIdentifier);
this.invokeOnInitCallbacks(instance!, instanceIdentifier);

/**
* Order is important
Expand All @@ -339,7 +339,7 @@ export class Provider<T extends Name> {
this.component.onInstanceCreated(
this.container,
instanceIdentifier,
instance
instance!
);
} catch {
// ignore errors in the onInstanceCreatedCallback
Expand Down
6 changes: 2 additions & 4 deletions packages/component/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@
"outDir": "dist",
"downlevelIteration": true
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
4 changes: 4 additions & 0 deletions packages/data-connect/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import typescript from 'typescript';
import { generateBuildTargetReplaceConfig } from '../../scripts/build/rollup_replace_build_target';
import { emitModulePackageFile } from '../../scripts/build/rollup_emit_module_package_file';
import pkg from './package.json';
import tsconfig from './tsconfig.json';

const deps = [
...Object.keys({ ...pkg.peerDependencies, ...pkg.dependencies }),
Expand All @@ -38,6 +39,9 @@ function onWarn(warning, defaultWarn) {
const buildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
exclude: [...tsconfig.exclude, '**/*.test.ts']
},
abortOnError: false
}),
json({ preferConst: true })
Expand Down
5 changes: 1 addition & 4 deletions packages/data-connect/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@
"outDir": "dist",
"strict": false
},
"exclude": [
"dist/**/*",
"test/**/*"
]
"exclude": ["dist/**/*", "test/**/*"]
}
6 changes: 2 additions & 4 deletions packages/database-compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
"strict": false,
"downlevelIteration": true
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/database-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
4 changes: 4 additions & 0 deletions packages/database/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import typescript from 'typescript';
import { generateBuildTargetReplaceConfig } from '../../scripts/build/rollup_replace_build_target';
import { emitModulePackageFile } from '../../scripts/build/rollup_emit_module_package_file';
import pkg from './package.json';
import tsconfig from './tsconfig.json';

const deps = [
...Object.keys({ ...pkg.peerDependencies, ...pkg.dependencies }),
Expand All @@ -38,6 +39,9 @@ function onWarn(warning, defaultWarn) {
const buildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
exclude: [...tsconfig.exclude, '**/*.test.ts']
},
abortOnError: false
}),
json({ preferConst: true })
Expand Down
6 changes: 2 additions & 4 deletions packages/database/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@
"strict": false,
"downlevelIteration": true
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
6 changes: 2 additions & 4 deletions packages/firebase/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"exclude": [
"**/dist/**/*"
]
}
"exclude": ["**/dist/**/*"]
}
4 changes: 1 addition & 3 deletions packages/firestore-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"noEmit": true
},
"exclude": [
"dist/**/*"
]
"exclude": ["dist/**/*"]
}
3 changes: 3 additions & 0 deletions packages/firestore/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ import typescript from 'typescript';
import { generateBuildTargetReplaceConfig } from '../../scripts/build/rollup_replace_build_target';

import pkg from './package.json';
import tsconfig from './tsconfig.json';

const sourcemaps = require('rollup-plugin-sourcemaps');
const util = require('./rollup.shared');

const nodePlugins = [
typescriptPlugin({
typescript,
exclude: [...tsconfig.exclude, '**/*.test.ts'],
cacheDir: tmp.dirSync(),
abortOnError: true,
transformers: [util.removeAssertTransformer]
Expand All @@ -48,6 +50,7 @@ const nodePlugins = [
const browserPlugins = [
typescriptPlugin({
typescript,
exclude: [...tsconfig.exclude, '**/*.test.ts'],
cacheDir: tmp.dirSync(),
abortOnError: true,
transformers: [util.removeAssertAndPrefixInternalTransformer]
Expand Down
1 change: 0 additions & 1 deletion packages/firestore/rollup.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const typescriptPlugin = require('rollup-plugin-typescript2');
const typescript = require('typescript');
const { terser } = require('@rollup/plugin-terser');
const path = require('path');
const sourcemaps = require('rollup-plugin-sourcemaps');

const { renameInternals } = require('./scripts/rename-internals');
const { extractPublicIdentifiers } = require('./scripts/extract-api');
Expand Down
4 changes: 2 additions & 2 deletions packages/firestore/test/unit/specs/describe_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ function stringifyGroup(s: string): number {
* some logically-first keys before others.
*/
function stringifyComparator(
a: { key: string, value: unknown },
b: { key: string, value: unknown }
a: { key: string; value: unknown },
b: { key: string; value: unknown }
): number {
const aGroup = stringifyGroup(a.key);
const bGroup = stringifyGroup(b.key);
Expand Down
6 changes: 2 additions & 4 deletions packages/functions-compat/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@
"compilerOptions": {
"outDir": "dist"
},
"exclude": [
"dist/**/*"
]
}
"exclude": ["dist/**/*"]
}
Loading

0 comments on commit 03d26e6

Please sign in to comment.