@canmi/web 2026.1004.2 → 2026.1004.4
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/README.md +8 -0
- package/dist/compat/src/build.d.ts +2 -1
- package/dist/compat/src/build.js +2 -1
- package/dist/compat/src/index.d.ts +1 -1
- package/dist/compat/src/index.js +1 -1
- package/dist/referer/src/index.d.ts +1 -1
- package/dist/referer/src/index.js +1 -1
- package/dist/sentry/src/build.d.ts +3 -3
- package/dist/sentry/src/build.js +3 -3
- package/dist/sentry/src/options.js +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# @canmi/web
|
|
2
|
+
|
|
3
|
+
What a SvelteKit app of the author's needs beside its own code: the browser floor and the core-js
|
|
4
|
+
fallback behind it (`@canmi/web/compat`), the arrival parameters taken out of the address bar
|
|
5
|
+
(`@canmi/web/referer`), and the Sentry wiring (`@canmi/web/sentry/*`). `@sveltejs/kit` and
|
|
6
|
+
`@sentry/sveltekit` are optional peers, needed by the Sentry part alone.
|
|
7
|
+
|
|
8
|
+
Versioned by the day it was released, `YYYY.MDD.N`; see the repository's `spec/repository.md`.
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Reads an app's `browserslist` floors into esbuild's `build.target`.
|
|
4
4
|
*
|
|
5
|
-
* See spec/compat.md, "The syntax floor is
|
|
5
|
+
* See spec/web/compat.md, "The syntax floor is an app's `browserslist`, read into esbuild's
|
|
6
|
+
* target".
|
|
6
7
|
*/
|
|
7
8
|
export declare function esbuildTarget(browserslist: string[]): string[];
|
|
8
9
|
//#endregion
|
package/dist/compat/src/build.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Reads an app's `browserslist` floors into esbuild's `build.target`.
|
|
4
4
|
*
|
|
5
|
-
* See spec/compat.md, "The syntax floor is
|
|
5
|
+
* See spec/web/compat.md, "The syntax floor is an app's `browserslist`, read into esbuild's
|
|
6
|
+
* target".
|
|
6
7
|
*/
|
|
7
8
|
function esbuildTarget(browserslist) {
|
|
8
9
|
return browserslist.map((query) => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* core-js. A new one met in production is one more line here and one in canaries.test.ts.
|
|
5
5
|
*
|
|
6
6
|
* Why a list of met cases and not a complete one, why `stable` and not `es` or `actual` -- see
|
|
7
|
-
* spec/compat.md, "The API floor".
|
|
7
|
+
* spec/web/compat.md, "The API floor: a short list of canaries, and all of core-js behind it".
|
|
8
8
|
*/
|
|
9
9
|
export declare const CANARIES: {
|
|
10
10
|
name: string;
|
package/dist/compat/src/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* core-js. A new one met in production is one more line here and one in canaries.test.ts.
|
|
5
5
|
*
|
|
6
6
|
* Why a list of met cases and not a complete one, why `stable` and not `es` or `actual` -- see
|
|
7
|
-
* spec/compat.md, "The API floor".
|
|
7
|
+
* spec/web/compat.md, "The API floor: a short list of canaries, and all of core-js behind it".
|
|
8
8
|
*/
|
|
9
9
|
const CANARIES = [{
|
|
10
10
|
name: "Array.prototype.toSorted",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region referer/src/index.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Where a reader came from, taken out of the address bar. See spec/
|
|
3
|
+
* Where a reader came from, taken out of the address bar. See spec/web/referer.md.
|
|
4
4
|
*/
|
|
5
5
|
/** Parameters a link may carry into any page, taken out once the page is running. */
|
|
6
6
|
export declare const ARRIVAL_PARAMETERS: readonly ['ref'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region referer/src/index.ts
|
|
2
2
|
/**
|
|
3
|
-
* Where a reader came from, taken out of the address bar. See spec/
|
|
3
|
+
* Where a reader came from, taken out of the address bar. See spec/web/referer.md.
|
|
4
4
|
*/
|
|
5
5
|
/** Parameters a link may carry into any page, taken out once the page is running. */
|
|
6
6
|
const ARRIVAL_PARAMETERS = ["ref"];
|
|
@@ -17,9 +17,9 @@ export interface UploadPolicy {
|
|
|
17
17
|
* Whether this build sends its source maps to Sentry: only when `SENTRY_AUTH_TOKEN` is set.
|
|
18
18
|
*
|
|
19
19
|
* `SENTRY_SKIP_UPLOAD`, set in `mise.toml`, turns it off whatever the token says -- see
|
|
20
|
-
* spec/architecture/data.md, "A CI build compiles the site, and no longer compiles the
|
|
21
|
-
* Any non-empty value skips, so `SENTRY_SKIP_UPLOAD= pnpm run build` is how one local
|
|
22
|
-
* uploads after all; `0` and `false` skip too, since this is a switch and parses no words.
|
|
20
|
+
* web's spec/architecture/data.md, "A CI build compiles the site, and no longer compiles the
|
|
21
|
+
* corpus". Any non-empty value skips, so `SENTRY_SKIP_UPLOAD= pnpm run build` is how one local
|
|
22
|
+
* build uploads after all; `0` and `false` skip too, since this is a switch and parses no words.
|
|
23
23
|
*/
|
|
24
24
|
export declare function uploadsSourceMaps(env: BuildEnv, policy?: UploadPolicy): boolean;
|
|
25
25
|
export interface PluginRequest {
|
package/dist/sentry/src/build.js
CHANGED
|
@@ -5,9 +5,9 @@ const SENTRY_ORG = "canmi";
|
|
|
5
5
|
* Whether this build sends its source maps to Sentry: only when `SENTRY_AUTH_TOKEN` is set.
|
|
6
6
|
*
|
|
7
7
|
* `SENTRY_SKIP_UPLOAD`, set in `mise.toml`, turns it off whatever the token says -- see
|
|
8
|
-
* spec/architecture/data.md, "A CI build compiles the site, and no longer compiles the
|
|
9
|
-
* Any non-empty value skips, so `SENTRY_SKIP_UPLOAD= pnpm run build` is how one local
|
|
10
|
-
* uploads after all; `0` and `false` skip too, since this is a switch and parses no words.
|
|
8
|
+
* web's spec/architecture/data.md, "A CI build compiles the site, and no longer compiles the
|
|
9
|
+
* corpus". Any non-empty value skips, so `SENTRY_SKIP_UPLOAD= pnpm run build` is how one local
|
|
10
|
+
* build uploads after all; `0` and `false` skip too, since this is a switch and parses no words.
|
|
11
11
|
*/
|
|
12
12
|
function uploadsSourceMaps(env, policy = {}) {
|
|
13
13
|
if (env.SENTRY_SKIP_UPLOAD) return false;
|
|
@@ -9,7 +9,7 @@ const silent = () => ({
|
|
|
9
9
|
*
|
|
10
10
|
* Development initializes the SDK with every integration installed, so capture is exercised, and
|
|
11
11
|
* hands it a transport that sends nothing. `enabled: false` would install no integrations at all.
|
|
12
|
-
* See spec/analytics.md, "Development loads the client and reports nothing".
|
|
12
|
+
* See web's spec/analytics.md, "Development loads the client and reports nothing".
|
|
13
13
|
*/
|
|
14
14
|
function initOptions(dsn, dev) {
|
|
15
15
|
return {
|