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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -4,6 +4,9 @@ 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 = {
10
+ yarnWatcher: false,
8
11
  exampleFeature: false
9
12
  };
package/lib/types.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export type FeatureFlags = {
2
+ readonly yarnWatcher: boolean;
3
+ // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect
4
+ readonly exampleFeature: boolean;
5
+ };
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.3171+79b158883",
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": "79b158883170daac9cd17bdecfebff163bc99e52"
24
28
  }
package/src/index.js CHANGED
@@ -1,10 +1,11 @@
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
+ yarnWatcher: false,
9
10
  exampleFeature: false,
10
11
  };
package/src/types.js ADDED
@@ -0,0 +1,7 @@
1
+ // @flow strict
2
+
3
+ export type FeatureFlags = {|
4
+ +yarnWatcher: boolean,
5
+ // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect
6
+ +exampleFeature: boolean,
7
+ |};