@sigmacomputing/plugin 0.7.57 → 1.0.0-rc.1
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/.gitignore +30 -0
- package/.lintstagedrc +3 -0
- package/.nvmrc +1 -0
- package/.prettierrc +5 -0
- package/CHANGELOG.md +25 -0
- package/CONTRIBUTING.md +60 -0
- package/{LICENSE.md → LICENSE} +0 -0
- package/README.md +782 -8
- package/assets/sigma-logo-dark.svg +54 -0
- package/assets/sigma-logo-light.svg +50 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/{client.js → client/index.js} +2 -1
- package/dist/client/initialize.d.ts +3 -0
- package/dist/client/initialize.d.ts.map +1 -0
- package/dist/{initialize.js → client/initialize.js} +1 -1
- package/dist/client/react/Context.d.ts +4 -0
- package/dist/client/react/Context.d.ts.map +1 -0
- package/dist/client/react/Context.js +6 -0
- package/dist/client/react/Provider.d.ts +8 -0
- package/dist/client/react/Provider.d.ts.map +1 -0
- package/dist/client/react/Provider.js +9 -0
- package/dist/client/react/hooks.d.ts +48 -0
- package/dist/client/react/hooks.d.ts.map +1 -0
- package/dist/{react/index.js → client/react/hooks.js} +23 -60
- package/dist/client/react/index.d.ts +4 -0
- package/dist/client/react/index.d.ts.map +1 -0
- package/dist/client/react/index.js +21 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -9
- package/dist/types.d.ts +262 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/{deepEqual.d.ts → utils/deepEqual.d.ts} +0 -0
- package/dist/utils/deepEqual.d.ts.map +1 -0
- package/dist/utils/deepEqual.js +29 -0
- package/jest.config.ts +22 -0
- package/package.json +50 -17
- package/src/client/__tests__/initialize.test.ts +30 -0
- package/src/client/index.ts +5 -0
- package/src/client/initialize.ts +199 -0
- package/src/client/react/Context.ts +6 -0
- package/src/client/react/Provider.tsx +19 -0
- package/src/client/react/hooks.ts +178 -0
- package/src/client/react/index.tsx +6 -0
- package/src/index.ts +3 -0
- package/src/types.ts +322 -0
- package/src/utils/deepEqual.ts +24 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +35 -0
- package/yarn.lock +3226 -0
- package/dist/client.d.ts +0 -2
- package/dist/client.d.ts.map +0 -1
- package/dist/deepEqual.d.ts.map +0 -1
- package/dist/deepEqual.js +0 -46
- package/dist/initialize.d.ts +0 -3
- package/dist/initialize.d.ts.map +0 -1
- package/dist/initialize.test.d.ts +0 -2
- package/dist/initialize.test.d.ts.map +0 -1
- package/dist/initialize.test.js +0 -26
- package/dist/react/index.d.ts +0 -58
- package/dist/react/index.d.ts.map +0 -1
package/.gitignore
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
+
|
|
3
|
+
# dependencies
|
|
4
|
+
node_modules/
|
|
5
|
+
|
|
6
|
+
# testing
|
|
7
|
+
coverage/
|
|
8
|
+
|
|
9
|
+
# production
|
|
10
|
+
dist/
|
|
11
|
+
|
|
12
|
+
# misc
|
|
13
|
+
.DS_Store
|
|
14
|
+
.env.local
|
|
15
|
+
.envrc
|
|
16
|
+
eslint_output.json
|
|
17
|
+
tsc_output
|
|
18
|
+
|
|
19
|
+
npm-debug.log*
|
|
20
|
+
yarn-debug.log*
|
|
21
|
+
yarn-error.log*
|
|
22
|
+
|
|
23
|
+
# vim
|
|
24
|
+
*.swp
|
|
25
|
+
|
|
26
|
+
# IDE files
|
|
27
|
+
.idea
|
|
28
|
+
|
|
29
|
+
# typescript
|
|
30
|
+
tsconfig*.tsbuildinfo
|
package/.lintstagedrc
ADDED
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v16.13.1
|
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
## v1.0.0 (September 2nd, 2022)
|
|
2
|
+
|
|
3
|
+
`@sigmacomputing/plugin` has moved to https://github.com/sigmacomputing/plugin and
|
|
4
|
+
is now open source. Feel free to create an issue or contribute by opening a pull
|
|
5
|
+
request. Read out `CONTRIBUTING.md` guide to get started.
|
|
6
|
+
|
|
7
|
+
#### Breaking Changes
|
|
8
|
+
|
|
9
|
+
- `@sigmacomputing/plugin-types` has been merged with `@sigmacomputing/plugin`
|
|
10
|
+
and will no longer received updates in the future. Please use only
|
|
11
|
+
`@sigmacomputing/plugin` going forward.
|
|
12
|
+
|
|
13
|
+
- All `react` exports (`SigmaClientProvider` and all hooks) have been moved to
|
|
14
|
+
a separate explicit export. This will allow better bundle splitting by not
|
|
15
|
+
including `react` specific code for plugins that do not use `react`.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
// before
|
|
19
|
+
import { SigmaClientProvider, usePlugin } from '@sigmacomputing/plugin';
|
|
20
|
+
|
|
21
|
+
// after
|
|
22
|
+
import { SigmaClientProvider, usePlugin } from '@sigmacomputing/plugin/react';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
All types can be imported from either `@sigmacomputing/plugin` or `@sigmacomputing/plugin/react`
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
## Initial setup
|
|
2
|
+
|
|
3
|
+
Start by forking the `@sigmacomputing/plugin` repo and cloning it locally.
|
|
4
|
+
|
|
5
|
+
```shs
|
|
6
|
+
git clone https://github.com/your-username/sigmacomputing-plugin.git
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Navigate to the `sigmacomputing-plugin` directory and install the required
|
|
10
|
+
dependencies with the following commands:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
# Ensure you have node version 16 installed (suggestion: v16.13.1).
|
|
14
|
+
nvm install
|
|
15
|
+
yarn install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Start Developing
|
|
19
|
+
|
|
20
|
+
You can run any of the scripts located in the `package.json` using:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
yarn <script-name>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
For example, you can run the build process with
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
yarn build
|
|
30
|
+
# Or in watch mode
|
|
31
|
+
yarn build:watch
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Add tests
|
|
35
|
+
|
|
36
|
+
Unit tests ensure that `@sigmacomputing/plugin` doesn't break accidentally. If
|
|
37
|
+
your code can regress in non-obvious ways, include unit tests with your PR. Use
|
|
38
|
+
the following naming convention:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
+-- parentFolder
|
|
42
|
+
| +-- __tests__
|
|
43
|
+
| +-- [filename].test.ts
|
|
44
|
+
| +-- [filename].ts
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Our unit test suite uses [jest](https://jestjs.io/)
|
|
48
|
+
|
|
49
|
+
## Submit a pull request
|
|
50
|
+
|
|
51
|
+
Before submitting your contribution, run the test suite one last time with:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
yarn test
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Doing this prevents last-minute bugs and is also a great way to get your
|
|
58
|
+
contribution merged faster once you submit your pull request. Failing to do so
|
|
59
|
+
will lead to one of the maintainers mark the pull request with the Work in
|
|
60
|
+
Progress label until all tests pass.
|
package/{LICENSE.md → LICENSE}
RENAMED
|
File without changes
|