Skip to content

Commit 7650483

Browse files
committed
bootstrap new feedback integration system
1 parent 7901d32 commit 7650483

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2229
-0
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
"packages/feedback",
5959
"packages/feedback-async",
6060
"packages/feedback-screenshot",
61+
"packages/feedback2",
62+
"packages/feedback2-modal",
63+
"packages/feedback2-screenshot",
6164
"packages/gatsby",
6265
"packages/integrations",
6366
"packages/integration-shims",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
build/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file
2+
// lives
3+
4+
// ESLint config docs: https://eslint.org/docs/user-guide/configuring/
5+
6+
module.exports = {
7+
extends: ['../../.eslintrc.js'],
8+
overrides: [
9+
{
10+
files: ['src/**/*.ts', 'src/**/*.tsx'],
11+
rules: {
12+
'@sentry-internal/sdk/no-unsupported-es6-methods': 'off',
13+
},
14+
},
15+
{
16+
files: ['jest.setup.ts', 'jest.config.ts'],
17+
parserOptions: {
18+
project: ['tsconfig.test.json'],
19+
},
20+
rules: {
21+
'no-console': 'off',
22+
},
23+
},
24+
],
25+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
/*.tgz
3+
.eslintcache
4+
build

packages/feedback2-modal/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright (c) 2023 Sentry (https://sentry.io) and individual contributors. All rights reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
5+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
6+
persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
9+
Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
12+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
13+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
14+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

packages/feedback2-modal/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<p align="center">
2+
<a href="https://sentry.io/?utm_source=github&utm_medium=logo" target="_blank">
3+
<img src="https://sentry-brand.storage.googleapis.com/sentry-wordmark-dark-280x84.png" alt="Sentry" width="280" height="84">
4+
</a>
5+
</p>
6+
7+
# Sentry Integration for Feedback
8+
9+
This SDK is **considered experimental and in a beta state**. It may experience breaking changes, and may be discontinued at any time. Please reach out on
10+
[GitHub](https://github.com/getsentry/sentry-javascript/issues/new/choose) if you have any feedback/concerns.
11+
12+
To view Feedback in Sentry, your [Sentry organization must be an early adopter](https://docs.sentry.io/product/accounts/early-adopter-features/).
13+
14+
## Installation
15+
16+
Please read the [offical integration documentation](https://docs.sentry.io/platforms/javascript/user-feedback/) for installation instructions.
17+
18+
## Configuration
19+
20+
The Feedback integration is highly customizable, please read the [official integration documentation](https://docs.sentry.io/platforms/javascript/user-feedback/configuration/) for the most up-to-date configuration options.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const baseConfig = require('../../jest/jest.config.js');
2+
3+
module.exports = {
4+
...baseConfig,
5+
testEnvironment: 'jsdom',
6+
};
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "@sentry-internal/feedback2-modal",
3+
"version": "7.100.0",
4+
"description": "Sentry SDK integration for user feedback",
5+
"repository": "git://github.com/getsentry/sentry-javascript.git",
6+
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/feedback",
7+
"author": "Sentry",
8+
"license": "MIT",
9+
"engines": {
10+
"node": ">=12"
11+
},
12+
"files": [
13+
"cjs",
14+
"esm",
15+
"types",
16+
"types-ts3.8"
17+
],
18+
"main": "build/npm/cjs/index.js",
19+
"module": "build/npm/esm/index.js",
20+
"types": "build/npm/types/index.d.ts",
21+
"typesVersions": {
22+
"<4.9": {
23+
"build/npm/types/index.d.ts": [
24+
"build/npm/types-ts3.8/index.d.ts"
25+
]
26+
}
27+
},
28+
"publishConfig": {
29+
"access": "public"
30+
},
31+
"dependencies": {
32+
"@sentry-internal/feedback-screenshot": "7.100.0",
33+
"@sentry/core": "7.100.0",
34+
"@sentry/types": "7.100.0",
35+
"@sentry/utils": "7.100.0",
36+
"preact": "^10.19.4",
37+
"preact-compat": "^3.19.0"
38+
},
39+
"scripts": {
40+
"build": "run-p build:transpile build:types build:bundle",
41+
"build:transpile": "rollup -c rollup.npm.config.mjs",
42+
"build:bundle": "rollup -c rollup.bundle.config.mjs",
43+
"build:dev": "run-p build:transpile build:types",
44+
"build:types": "run-s build:types:core build:types:downlevel",
45+
"build:types:core": "tsc -p tsconfig.types.json",
46+
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8",
47+
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
48+
"build:dev:watch": "run-p build:transpile:watch build:types:watch",
49+
"build:transpile:watch": "yarn build:transpile --watch",
50+
"build:bundle:watch": "yarn build:bundle --watch",
51+
"build:types:watch": "tsc -p tsconfig.types.json --watch",
52+
"build:tarball": "ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm",
53+
"circularDepCheck": "madge --circular src/index.ts",
54+
"clean": "rimraf build sentry-feedback-*.tgz",
55+
"fix": "eslint . --format stylish --fix",
56+
"lint": "eslint . --format stylish",
57+
"test": "jest",
58+
"test:watch": "jest --watch",
59+
"yalc:publish": "ts-node ../../scripts/prepack.ts --bundles && yalc publish ./build/npm --push --sig"
60+
},
61+
"volta": {
62+
"extends": "../../package.json"
63+
},
64+
"sideEffects": false
65+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { makeBaseBundleConfig, makeBundleConfigVariants } from '@sentry-internal/rollup-utils';
2+
3+
export default makeBundleConfigVariants(
4+
makeBaseBundleConfig({
5+
bundleType: 'addon',
6+
entrypoints: ['src/index.ts'],
7+
jsVersion: 'es6',
8+
licenseTitle: '@sentry-internal/feedback-async',
9+
outputFileBase: () => 'bundles/feedback-async',
10+
sucrase: {
11+
jsxPragma: 'h',
12+
jsxFragmentPragma: 'Fragment',
13+
},
14+
}),
15+
);
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { makeBaseNPMConfig, makeNPMConfigVariants } from '@sentry-internal/rollup-utils';
2+
3+
export default makeNPMConfigVariants(
4+
makeBaseNPMConfig({
5+
hasBundles: true,
6+
packageSpecificConfig: {
7+
output: {
8+
// set exports to 'named' or 'auto' so that rollup doesn't warn
9+
exports: 'named',
10+
// set preserveModules to false because for feedback we actually want
11+
// to bundle everything into one file.
12+
preserveModules: false,
13+
},
14+
},
15+
}),
16+
);

0 commit comments

Comments
 (0)