Skip to content

Commit 823e2c1

Browse files
committed
copilot review updates
1 parent 94cbeec commit 823e2c1

File tree

5 files changed

+3
-17
lines changed

5 files changed

+3
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ If you're updating your SDK version, please check the appropriate migration guid
209209

210210
### Platform Isolation
211211

212-
The SDK supports multiple JavaScript platforms (Browser, Node.js, React Native) with a unified codebase. To prevent runtime errors from platform-specific code being bundled incorrectly, we enforce **platform isolation** constraints:
212+
The SDK supports multiple JavaScript platforms (Browser, Node.js, React Native and universal) with a unified codebase. To prevent runtime errors from platform-specific code being bundled incorrectly, we enforce **platform isolation** constraints:
213213

214214
- Every source file must declare which platforms it supports using `export const __platforms: Platform[] = [...]`
215215
- Files can only import from other files that support all their declared platforms

lib/index.browser.umdtests.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ import packageJSON from '../package.json';
2525
import eventDispatcher from './plugins/event_dispatcher/index.browser';
2626
import { INVALID_CONFIG_OR_SOMETHING } from './exception_messages';
2727

28-
export const __platforms = ['browser'] as const;
29-
3028
describe('javascript-sdk', function() {
3129
describe('APIs', function() {
3230
describe('createInstance', function() {

lib/project_config/optimizely_config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ import {
3434
VariationVariable,
3535
} from '../shared_types';
3636

37-
38-
import { DATAFILE_VERSIONS } from '../utils/enums';
3937
import { Platform } from '../platform_support';
4038

4139
interface FeatureVariablesMap {

scripts/validate-platform-isolation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Platform Detection:
2626
* - ALL source files (except tests) MUST export __platforms array
2727
* - Universal files use: export const __platforms = ['__universal__'];
28-
* - Platform-specific files use platforn names, e.g: export const __platforms = ['browser', 'node'];
28+
* - Platform-specific files use platform names, e.g: export const __platforms = ['browser', 'node'];
2929
* - Valid platform values are dynamically read from Platform type in platform_support.ts
3030
*
3131
* Rules:
@@ -59,7 +59,7 @@ const compilerOptions = ts.convertCompilerOptionsFromJson(
5959
const config = loadConfig();
6060
const configPath = path.join(WORKSPACE_ROOT, '.platform-isolation.config.js');
6161

62-
// Track files with errrors in __platforms export
62+
// Track files with errors in __platforms export
6363
const fileErrors = new Map();
6464

6565
/**

vitest.config.mts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,5 @@ export default defineConfig({
3131
enabled: true,
3232
tsconfig: 'tsconfig.spec.json',
3333
},
34-
coverage: {
35-
provider: 'istanbul',
36-
include: ['lib/**/*.ts'],
37-
exclude: [
38-
'**/tests/**',
39-
'**/*.spec.ts',
40-
'**/*.gen.ts',
41-
'**/*d.ts',
42-
],
43-
},
4434
},
4535
});

0 commit comments

Comments
 (0)