@fluentui/react-portal-compat-context 9.0.1 → 9.0.2

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/CHANGELOG.json CHANGED
@@ -2,7 +2,63 @@
2
2
  "name": "@fluentui/react-portal-compat-context",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 15 Jul 2022 18:27:18 GMT",
5
+ "date": "Thu, 15 Sep 2022 09:44:37 GMT",
6
+ "tag": "@fluentui/react-portal-compat-context_v9.0.2",
7
+ "version": "9.0.2",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "martinhochel@microsoft.com",
12
+ "package": "@fluentui/react-portal-compat-context",
13
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
14
+ "comment": "chore: update package scaffold"
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "lingfangao@hotmail.com",
20
+ "package": "@fluentui/react-portal-compat-context",
21
+ "commit": "a0cfab0e5f74e3a3bfa9c269fff574295042d7f2",
22
+ "comment": "chore: fix no-context-default-value lint violations"
23
+ }
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "date": "Wed, 03 Aug 2022 16:03:55 GMT",
29
+ "tag": "@fluentui/react-portal-compat-context_v9.0.1",
30
+ "version": "9.0.1",
31
+ "comments": {
32
+ "none": [
33
+ {
34
+ "author": "bernardo.sunderhus@gmail.com",
35
+ "package": "@fluentui/react-portal-compat-context",
36
+ "commit": "d966ea3d9169f2e8d69f0d2a4daf86fe4ca328d6",
37
+ "comment": "disables eslint rule @fluentui/no-context-default-value for local component context"
38
+ },
39
+ {
40
+ "author": "lingfangao@hotmail.com",
41
+ "package": "@fluentui/react-portal-compat-context",
42
+ "commit": "99cc385631d04a76ee10ebc143cb9fecd99640b6",
43
+ "comment": "chore: Add `prerelease` as disallowed changetype for 9.0.0 packages"
44
+ },
45
+ {
46
+ "author": "martinhochel@microsoft.com",
47
+ "package": "@fluentui/react-portal-compat-context",
48
+ "commit": "30737a497e7787fe8b4efddeadb4a261ba19933f",
49
+ "comment": "refactor(scripts): replace isCompatibilityPackage with new --module build flag"
50
+ },
51
+ {
52
+ "author": "lingfangao@hotmail.com",
53
+ "package": "@fluentui/react-portal-compat-context",
54
+ "commit": "6731ada047afe1d79d2765d1464cfa9acb90bee8",
55
+ "comment": "chore: Explicitly enable AMD lint-imports rule"
56
+ }
57
+ ]
58
+ }
59
+ },
60
+ {
61
+ "date": "Fri, 15 Jul 2022 18:27:27 GMT",
6
62
  "tag": "@fluentui/react-portal-compat-context_v9.0.1",
7
63
  "version": "9.0.1",
8
64
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-portal-compat-context
2
2
 
3
- This log was last generated on Fri, 15 Jul 2022 18:27:18 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 15 Sep 2022 09:44:37 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v9.0.2)
8
+
9
+ Thu, 15 Sep 2022 09:44:37 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.1..@fluentui/react-portal-compat-context_v9.0.2)
11
+
12
+ ### Patches
13
+
14
+ - chore: fix no-context-default-value lint violations ([PR #24276](https://github.com/microsoft/fluentui/pull/24276) by lingfangao@hotmail.com)
15
+
7
16
  ## [9.0.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-portal-compat-context_v9.0.1)
8
17
 
9
- Fri, 15 Jul 2022 18:27:18 GMT
18
+ Fri, 15 Jul 2022 18:27:27 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-portal-compat-context_v9.0.0..@fluentui/react-portal-compat-context_v9.0.1)
11
20
 
12
21
  ### Patches
@@ -1,10 +1,16 @@
1
1
  import * as React from 'react';
2
- var PortalCompatContext = /*#__PURE__*/React.createContext( // eslint-disable-next-line @typescript-eslint/no-empty-function
3
- function () {
4
- return function () {};
5
- });
2
+ var PortalCompatContext = /*#__PURE__*/React.createContext(undefined);
3
+
4
+ var portalCompatContextDefaultValue = function () {
5
+ return function () {
6
+ return undefined;
7
+ };
8
+ };
9
+
6
10
  export var PortalCompatContextProvider = PortalCompatContext.Provider;
7
11
  export function usePortalCompat() {
8
- return React.useContext(PortalCompatContext);
12
+ var _a;
13
+
14
+ return (_a = React.useContext(PortalCompatContext)) !== null && _a !== void 0 ? _a : portalCompatContextDefaultValue;
9
15
  }
10
16
  //# sourceMappingURL=PortalCompatContext.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PortalCompatContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,IAAM,mBAAmB,gBAAG,KAAK,CAAC,aAAN,EAC1B;AACA,YAAA;EAAM,OAAA,YAAA,CAAA,CAAA;AAAQ,CAFY,CAA5B;AAKA,OAAO,IAAM,2BAA2B,GAAG,mBAAmB,CAAC,QAAxD;AAEP,OAAM,SAAU,eAAV,GAAyB;EAC7B,OAAO,KAAK,CAAC,UAAN,CAAiB,mBAAjB,CAAP;AACD","sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn>(\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n () => () => {},\n);\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["PortalCompatContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AAGA,IAAM,mBAAmB,gBAAG,KAAK,CAAC,aAAN,CAC1B,SAD0B,CAA5B;;AAIA,IAAM,+BAA+B,GAAG,YAAA;EAAM,OAAA,YAAA;IAAM,OAAA,SAAA;EAAN,CAAA;AAAe,CAA7D;;AAEA,OAAO,IAAM,2BAA2B,GAAG,mBAAmB,CAAC,QAAxD;AAEP,OAAM,SAAU,eAAV,GAAyB;;;EAC7B,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,mBAAjB,CAAA,MAAqC,IAArC,IAAqC,EAAA,KAAA,KAAA,CAArC,GAAqC,EAArC,GAAyC,+BAAhD;AACD","sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn | undefined>(\n undefined,\n) as React.Context<RegisterPortalFn>;\n\nconst portalCompatContextDefaultValue = () => () => undefined;\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext) ?? portalCompatContextDefaultValue;\n}\n"],"sourceRoot":"../src/"}
@@ -2,12 +2,12 @@ define(["require", "exports", "react"], function (require, exports, React) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.usePortalCompat = exports.PortalCompatContextProvider = void 0;
5
- var PortalCompatContext = React.createContext(
6
- // eslint-disable-next-line @typescript-eslint/no-empty-function
7
- function () { return function () { }; });
5
+ var PortalCompatContext = React.createContext(undefined);
6
+ var portalCompatContextDefaultValue = function () { return function () { return undefined; }; };
8
7
  exports.PortalCompatContextProvider = PortalCompatContext.Provider;
9
8
  function usePortalCompat() {
10
- return React.useContext(PortalCompatContext);
9
+ var _a;
10
+ return (_a = React.useContext(PortalCompatContext)) !== null && _a !== void 0 ? _a : portalCompatContextDefaultValue;
11
11
  }
12
12
  exports.usePortalCompat = usePortalCompat;
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"PortalCompatContext.js","sourceRoot":"../src/","sources":["PortalCompatContext.ts"],"names":[],"mappings":";;;;IAGA,IAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa;IAC7C,gEAAgE;IAChE,cAAM,OAAA,cAAO,CAAC,EAAR,CAAQ,CACf,CAAC;IAEW,QAAA,2BAA2B,GAAG,mBAAmB,CAAC,QAAQ,CAAC;IAExE,SAAgB,eAAe;QAC7B,OAAO,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAC/C,CAAC;IAFD,0CAEC","sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn>(\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n () => () => {},\n);\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext);\n}\n"]}
1
+ {"version":3,"file":"PortalCompatContext.js","sourceRoot":"../src/","sources":["PortalCompatContext.ts"],"names":[],"mappings":";;;;IAGA,IAAM,mBAAmB,GAAG,KAAK,CAAC,aAAa,CAC7C,SAAS,CACyB,CAAC;IAErC,IAAM,+BAA+B,GAAG,cAAM,OAAA,cAAM,OAAA,SAAS,EAAT,CAAS,EAAf,CAAe,CAAC;IAEjD,QAAA,2BAA2B,GAAG,mBAAmB,CAAC,QAAQ,CAAC;IAExE,SAAgB,eAAe;;QAC7B,OAAO,MAAA,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,mCAAI,+BAA+B,CAAC;IAClF,CAAC;IAFD,0CAEC","sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn | undefined>(\n undefined,\n) as React.Context<RegisterPortalFn>;\n\nconst portalCompatContextDefaultValue = () => () => undefined;\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext) ?? portalCompatContextDefaultValue;\n}\n"]}
@@ -7,14 +7,20 @@ exports.usePortalCompat = exports.PortalCompatContextProvider = void 0;
7
7
 
8
8
  var React = /*#__PURE__*/require("react");
9
9
 
10
- var PortalCompatContext = /*#__PURE__*/React.createContext( // eslint-disable-next-line @typescript-eslint/no-empty-function
11
- function () {
12
- return function () {};
13
- });
10
+ var PortalCompatContext = /*#__PURE__*/React.createContext(undefined);
11
+
12
+ var portalCompatContextDefaultValue = function () {
13
+ return function () {
14
+ return undefined;
15
+ };
16
+ };
17
+
14
18
  exports.PortalCompatContextProvider = PortalCompatContext.Provider;
15
19
 
16
20
  function usePortalCompat() {
17
- return React.useContext(PortalCompatContext);
21
+ var _a;
22
+
23
+ return (_a = React.useContext(PortalCompatContext)) !== null && _a !== void 0 ? _a : portalCompatContextDefaultValue;
18
24
  }
19
25
 
20
26
  exports.usePortalCompat = usePortalCompat;
@@ -1 +1 @@
1
- {"version":3,"sources":["PortalCompatContext.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,IAAM,mBAAmB,gBAAG,KAAK,CAAC,aAAN,EAC1B;AACA,YAAA;EAAM,OAAA,YAAA,CAAA,CAAA;AAAQ,CAFY,CAA5B;AAKa,OAAA,CAAA,2BAAA,GAA8B,mBAAmB,CAAC,QAAlD;;AAEb,SAAgB,eAAhB,GAA+B;EAC7B,OAAO,KAAK,CAAC,UAAN,CAAiB,mBAAjB,CAAP;AACD;;AAFD,OAAA,CAAA,eAAA,GAAA,eAAA","sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn>(\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n () => () => {},\n);\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["PortalCompatContext.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAGA,IAAM,mBAAmB,gBAAG,KAAK,CAAC,aAAN,CAC1B,SAD0B,CAA5B;;AAIA,IAAM,+BAA+B,GAAG,YAAA;EAAM,OAAA,YAAA;IAAM,OAAA,SAAA;EAAN,CAAA;AAAe,CAA7D;;AAEa,OAAA,CAAA,2BAAA,GAA8B,mBAAmB,CAAC,QAAlD;;AAEb,SAAgB,eAAhB,GAA+B;;;EAC7B,OAAO,CAAA,EAAA,GAAA,KAAK,CAAC,UAAN,CAAiB,mBAAjB,CAAA,MAAqC,IAArC,IAAqC,EAAA,KAAA,KAAA,CAArC,GAAqC,EAArC,GAAyC,+BAAhD;AACD;;AAFD,OAAA,CAAA,eAAA,GAAA,eAAA","sourcesContent":["import * as React from 'react';\nimport type { RegisterPortalFn } from './types';\n\nconst PortalCompatContext = React.createContext<RegisterPortalFn | undefined>(\n undefined,\n) as React.Context<RegisterPortalFn>;\n\nconst portalCompatContextDefaultValue = () => () => undefined;\n\nexport const PortalCompatContextProvider = PortalCompatContext.Provider;\n\nexport function usePortalCompat() {\n return React.useContext(PortalCompatContext) ?? portalCompatContextDefaultValue;\n}\n"],"sourceRoot":"../src/"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-portal-compat-context",
3
- "version": "9.0.1",
3
+ "version": "9.0.2",
4
4
  "description": "A package that holds React context for compatibility of React Contexts",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -11,18 +11,15 @@
11
11
  "url": "https://github.com/microsoft/fluentui"
12
12
  },
13
13
  "license": "MIT",
14
- "fluent-compatibility": true,
15
14
  "scripts": {
16
- "build": "just-scripts build",
15
+ "build": "just-scripts build --module esm,cjs,amd",
17
16
  "clean": "just-scripts clean",
18
17
  "code-style": "just-scripts code-style",
19
18
  "just": "just-scripts",
20
- "lint": "just-scripts lint",
21
- "start": "yarn storybook",
19
+ "lint": "just-scripts lint && just-scripts lint-imports",
22
20
  "test": "jest --passWithNoTests",
23
21
  "docs": "api-extractor run --config=config/api-extractor.local.json --local",
24
- "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/packages/react-components/react-portal-compat-context/src && yarn docs",
25
- "storybook": "node ../../../scripts/storybook/runner",
22
+ "build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../../scripts/typescript/normalize-import --output ./dist/types/packages/react-components/react-portal-compat-context/src && yarn docs",
26
23
  "type-check": "tsc -b tsconfig.json"
27
24
  },
28
25
  "devDependencies": {
@@ -38,7 +35,8 @@
38
35
  },
39
36
  "beachball": {
40
37
  "disallowedChangeTypes": [
41
- "major"
38
+ "major",
39
+ "prerelease"
42
40
  ]
43
41
  }
44
42
  }
@@ -1,11 +0,0 @@
1
- // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
- // It should be published with your NPM package. It should not be tracked by Git.
3
- {
4
- "tsdocVersion": "0.12",
5
- "toolPackages": [
6
- {
7
- "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.18.1"
9
- }
10
- ]
11
- }