@backstage/test-utils 0.0.0-nightly-20230214023046 → 0.0.0-nightly-20230222023132

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.md CHANGED
@@ -1,17 +1,45 @@
1
1
  # @backstage/test-utils
2
2
 
3
- ## 0.0.0-nightly-20230214023046
3
+ ## 0.0.0-nightly-20230222023132
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - 928a12a9b3: Internal refactor of `/alpha` exports.
7
8
  - Updated dependencies
8
- - @backstage/theme@0.0.0-nightly-20230214023046
9
- - @backstage/core-app-api@0.0.0-nightly-20230214023046
10
- - @backstage/core-plugin-api@0.0.0-nightly-20230214023046
9
+ - @backstage/core-plugin-api@0.0.0-nightly-20230222023132
11
10
  - @backstage/config@1.0.6
11
+ - @backstage/core-app-api@0.0.0-nightly-20230222023132
12
+ - @backstage/theme@0.2.17
12
13
  - @backstage/types@1.0.2
13
14
  - @backstage/plugin-permission-common@0.7.3
14
- - @backstage/plugin-permission-react@0.0.0-nightly-20230214023046
15
+ - @backstage/plugin-permission-react@0.0.0-nightly-20230222023132
16
+
17
+ ## 1.2.6-next.0
18
+
19
+ ### Patch Changes
20
+
21
+ - 928a12a9b3: Internal refactor of `/alpha` exports.
22
+ - Updated dependencies
23
+ - @backstage/core-plugin-api@1.4.1-next.0
24
+ - @backstage/config@1.0.6
25
+ - @backstage/core-app-api@1.5.1-next.0
26
+ - @backstage/theme@0.2.17
27
+ - @backstage/types@1.0.2
28
+ - @backstage/plugin-permission-common@0.7.3
29
+ - @backstage/plugin-permission-react@0.4.11-next.0
30
+
31
+ ## 1.2.5
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies
36
+ - @backstage/theme@0.2.17
37
+ - @backstage/core-app-api@1.5.0
38
+ - @backstage/core-plugin-api@1.4.0
39
+ - @backstage/config@1.0.6
40
+ - @backstage/types@1.0.2
41
+ - @backstage/plugin-permission-common@0.7.3
42
+ - @backstage/plugin-permission-react@0.4.10
15
43
 
16
44
  ## 1.2.5-next.0
17
45
 
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/test-utils",
3
- "version": "0.0.0-nightly-20230214023046",
4
- "main": "../dist/index.esm.js",
5
- "types": "../dist/index.alpha.d.ts"
3
+ "version": "0.0.0-nightly-20230222023132",
4
+ "main": "../dist/alpha.esm.js",
5
+ "module": "../dist/alpha.esm.js",
6
+ "types": "../dist/alpha.d.ts"
6
7
  }
@@ -0,0 +1,9 @@
1
+ import { PropsWithChildren } from 'react';
2
+
3
+ /**
4
+ * Mock for PluginProvider to use in unit tests
5
+ * @alpha
6
+ */
7
+ declare const MockPluginProvider: ({ children }: PropsWithChildren<{}>) => JSX.Element;
8
+
9
+ export { MockPluginProvider };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { PluginProvider } from '@backstage/core-plugin-api/alpha';
3
+ import { createPlugin } from '@backstage/core-plugin-api';
4
+
5
+ const MockPluginProvider = ({ children }) => {
6
+ const plugin = createPlugin({
7
+ id: "my-plugin",
8
+ __experimentalConfigure(_) {
9
+ return {};
10
+ }
11
+ });
12
+ return /* @__PURE__ */ React.createElement(PluginProvider, { plugin }, children);
13
+ };
14
+
15
+ export { MockPluginProvider };
16
+ //# sourceMappingURL=alpha.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/testUtils/MockPluginProvider.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { PropsWithChildren } from 'react';\nimport { PluginProvider } from '@backstage/core-plugin-api/alpha';\nimport { createPlugin } from '@backstage/core-plugin-api';\n\n/**\n * Mock for PluginProvider to use in unit tests\n * @alpha\n */\nexport const MockPluginProvider = ({ children }: PropsWithChildren<{}>) => {\n type TestInputPluginOptions = {};\n type TestPluginOptions = {};\n const plugin = createPlugin({\n id: 'my-plugin',\n __experimentalConfigure(_: TestInputPluginOptions): TestPluginOptions {\n return {};\n },\n });\n\n return <PluginProvider plugin={plugin}>{children}</PluginProvider>;\n};\n"],"names":[],"mappings":";;;;AAwBO,MAAM,kBAAqB,GAAA,CAAC,EAAE,QAAA,EAAsC,KAAA;AAGzE,EAAA,MAAM,SAAS,YAAa,CAAA;AAAA,IAC1B,EAAI,EAAA,WAAA;AAAA,IACJ,wBAAwB,CAA8C,EAAA;AACpE,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,GACD,CAAA,CAAA;AAED,EAAO,uBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,MAAA,EAAA,EAAiB,QAAS,CAAA,CAAA;AACnD;;;;"}