@parcel/feature-flags 2.12.1-dev.3151 → 2.12.1-dev.3238

Sign up to get free protection for your applications and to get access to all the features.
package/lib/index.js CHANGED
@@ -4,6 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.DEFAULT_FEATURE_FLAGS = void 0;
7
+ // We need to do these gymnastics as we don't want flow-to-ts to touch DEFAULT_FEATURE_FLAGS,
8
+ // but we want to export FeatureFlags for Flow
7
9
  const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
8
10
  exampleFeature: false
9
11
  };
package/lib/types.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export type FeatureFlags = {
2
+ // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect
3
+ readonly exampleFeature: boolean;
4
+ };
package/lib/types.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/feature-flags",
3
- "version": "2.12.1-dev.3151+70889ca07",
3
+ "version": "2.12.1-dev.3238+7f6b4dbbc",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -16,9 +16,13 @@
16
16
  },
17
17
  "main": "lib/index.js",
18
18
  "source": "src/index.js",
19
- "types": "index.d.ts",
19
+ "types": "lib/types.d.ts",
20
+ "scripts": {
21
+ "build-ts": "mkdir -p lib && flow-to-ts src/types.js > lib/types.d.ts",
22
+ "check-ts": "tsc --noEmit lib/types.d.ts"
23
+ },
20
24
  "engines": {
21
25
  "node": ">= 16.0.0"
22
26
  },
23
- "gitHead": "70889ca07dccb95e21e4c6a2844d632e3723faf4"
27
+ "gitHead": "7f6b4dbbc56a203e0fce8794856c03598c4f6708"
24
28
  }
package/src/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // @flow strict
2
2
 
3
- export type FeatureFlags = {|
4
- // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect
5
- +exampleFeature: boolean,
6
- |};
3
+ import type {FeatureFlags as _FeatureFlags} from './types';
4
+ // We need to do these gymnastics as we don't want flow-to-ts to touch DEFAULT_FEATURE_FLAGS,
5
+ // but we want to export FeatureFlags for Flow
6
+ export type FeatureFlags = _FeatureFlags;
7
7
 
8
8
  export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
9
9
  exampleFeature: false,
package/src/types.js ADDED
@@ -0,0 +1,6 @@
1
+ // @flow strict
2
+
3
+ export type FeatureFlags = {|
4
+ // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect
5
+ +exampleFeature: boolean,
6
+ |};