Skip to content

chore(remix): Update package to 7.x structure #5266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions packages/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"@sentry/node": "7.1.1",
"@sentry/react": "7.1.1",
"@sentry/tracing": "7.1.1",
"@sentry/types": "7.1.1",
"@sentry/utils": "7.1.1",
"@sentry/webpack-plugin": "1.18.9",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry/types": "7.1.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this get moved?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's supposed to be a regular dependency, as it is in all of our other packages. Because we don't ship types directly in our SDKs, our users need @sentry/types if they're using TS.

"@types/webpack": "^4.41.31",
"@remix-run/node": "^1.4.3",
"@remix-run/react": "^1.4.3"
Expand All @@ -43,27 +43,25 @@
}
},
"scripts": {
"build": "run-p build:rollup",
"build": "run-p build:rollup build:types",
"build:dev": "run-s build",
"build:esm": "tsc -p tsconfig.esm.json",
"build:rollup": "rollup -c rollup.npm.config.js",
"build:types": "tsc -p tsconfig.types.json",
"build:watch": "run-p build:esm:watch",
"build:watch": "run-p build:rollup:watch build:types:watch",
"build:dev:watch": "run-s build:watch",
"build:esm:watch": "tsc -p tsconfig.esm.json --watch",
"build:rollup:watch": "rollup -c rollup.npm.config.js --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:npm": "ts-node ../../scripts/prepack.ts && npm pack ./build",
"clean": "rimraf build coverage",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build coverage sentry-remix-*.tgz",
"fix": "run-s fix:eslint fix:prettier",
"fix:eslint": "eslint . --format stylish --fix",
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
"link:yarn": "yarn link",
"lint": "run-s lint:prettier lint:eslint",
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",
"test": "run-s test:unit",
"test:unit": "jest --passWithNoTests",
"test:unit": "jest",
"test:watch": "jest --watch"
},
"volta": {
Expand Down
18 changes: 0 additions & 18 deletions packages/remix/src/flags.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/remix/src/performance/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { Transaction, TransactionContext } from '@sentry/types';
import { getGlobalObject, logger } from '@sentry/utils';
import * as React from 'react';

import { IS_DEBUG_BUILD } from '../flags';

const DEFAULT_TAGS = {
'routing.instrumentation': 'remix-router',
} as const;
Expand Down Expand Up @@ -85,7 +83,7 @@ export function remixRouterInstrumentation(useEffect: UseEffect, useLocation: Us
export function withSentryRouteTracing<P extends Record<string, unknown>, R extends React.FC<P>>(OrigApp: R): R {
// Early return when any of the required functions is not available.
if (!_useEffect || !_useLocation || !_useMatches || !_customStartTransaction) {
IS_DEBUG_BUILD && logger.warn('Remix SDK was unable to wrap your root because of one or more missing parameters.');
__DEBUG_BUILD__ && logger.warn('Remix SDK was unable to wrap your root because of one or more missing parameters.');

// @ts-ignore Setting more specific React Component typing for `R` generic above
// will break advanced type inference done by react router params
Expand Down
8 changes: 8 additions & 0 deletions packages/remix/test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as
// it's purely a placeholder to satisfy VSCode.

{
"extends": "../tsconfig.test.json",

"include": ["./**/*"]
}
8 changes: 0 additions & 8 deletions packages/remix/tsconfig.esm.json

This file was deleted.