aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-08-29 21:48:14 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-08-29 21:48:14 -0700
commitbd9f137b1bfb5bc3b215515ff9305e70a638daf9 (patch)
treee2a252e2b2478b6b1fb7cd23eb90e4da9c5bc8cd /src/test
parent34792c15f188d0c480d64022a9d3a67a89497c70 (diff)
downloadbun-bd9f137b1bfb5bc3b215515ff9305e70a638daf9.tar.gz
bun-bd9f137b1bfb5bc3b215515ff9305e70a638daf9.tar.zst
bun-bd9f137b1bfb5bc3b215515ff9305e70a638daf9.zip
latest
Former-commit-id: 096ec1222ad723d006b0151f10cb0c1b95e2bfd3
Diffstat (limited to '')
-rw-r--r--src/test/fixtures/browsermap-false.ts3
-rw-r--r--src/test/fixtures/main-field.ts3
-rw-r--r--src/test/fixtures/package.json7
-rw-r--r--src/test/fixtures/type-only-import.ts33
-rw-r--r--src/test/project.zig139
5 files changed, 178 insertions, 7 deletions
diff --git a/src/test/fixtures/browsermap-false.ts b/src/test/fixtures/browsermap-false.ts
new file mode 100644
index 000000000..aac72e325
--- /dev/null
+++ b/src/test/fixtures/browsermap-false.ts
@@ -0,0 +1,3 @@
+import { Foo } from "browsermap";
+
+console.log(Foo);
diff --git a/src/test/fixtures/main-field.ts b/src/test/fixtures/main-field.ts
new file mode 100644
index 000000000..5f69721c8
--- /dev/null
+++ b/src/test/fixtures/main-field.ts
@@ -0,0 +1,3 @@
+import Algolia from "algoliasearch/lite";
+
+console.log(Algolia);
diff --git a/src/test/fixtures/package.json b/src/test/fixtures/package.json
deleted file mode 100644
index 8555c8500..000000000
--- a/src/test/fixtures/package.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "name": "repo",
- "dependencies": {
- "react": "^16.8.4",
- "react-dom": "^16.8.4"
- }
-}
diff --git a/src/test/fixtures/type-only-import.ts b/src/test/fixtures/type-only-import.ts
new file mode 100644
index 000000000..af7c11a12
--- /dev/null
+++ b/src/test/fixtures/type-only-import.ts
@@ -0,0 +1,33 @@
+import { Foo } from "bacon";
+import React from "react";
+import * as Boom from "react";
+import { createElement } from "react";
+export const hello: Foo = React.createElement("div");
+
+export const bacon: (foo: (what: Foo) => (the: Foo) => Foo) => Foo = (
+ foo: Foo
+) => {
+ return createElement(true);
+};
+
+export function funcBacon(foo: (what: Foo) => (the: Foo) => void) {
+ this.Foo = foo;
+ Boom();
+}
+
+export abstract class Bar implements Foo {
+ bacon: Foo;
+ what: Foo;
+}
+
+export class Broke implements Foo {
+ bacon: Foo;
+ what: Foo;
+}
+export interface Baz extends Foo {
+ foo: Foo;
+ bar: Foo;
+ boop: Foo;
+ Foo: Foo;
+}
+export interface Baz extends Foo {}
diff --git a/src/test/project.zig b/src/test/project.zig
index 5715778c1..26dadbc94 100644
--- a/src/test/project.zig
+++ b/src/test/project.zig
@@ -1464,3 +1464,142 @@ pub const three = [_][]const u8{
"/project/node_modules/three/src/extras/curves/CatmullRomCurve3.js",
"/project/node_modules/three/src/extras/curves/SplineCurve.js",
};
+
+pub const next = [_][]const u8{
+ "next@11.1.0/app.js - 3424158524:2890943422",
+ "next@11.1.0/app.js - 3424158524:2890943422",
+ "next@11.1.0/dist/client/head-manager.js - 3424158524:2201168507",
+ "next@11.1.0/dist/client/head-manager.js - 3424158524:2201168507",
+ "next@11.1.0/dist/client/link.js - 3424158524:3978876338",
+ "next@11.1.0/dist/client/link.js - 3424158524:3978876338",
+ "next@11.1.0/dist/client/normalize-trailing-slash.js - 3424158524:3949960510",
+ "next@11.1.0/dist/client/normalize-trailing-slash.js - 3424158524:3949960510",
+ "next@11.1.0/dist/client/page-loader.js - 3424158524:3974401562",
+ "next@11.1.0/dist/client/request-idle-callback.js - 3424158524:2155089364",
+ "next@11.1.0/dist/client/request-idle-callback.js - 3424158524:2155089364",
+ "next@11.1.0/dist/client/route-loader.js - 3424158524:868049608",
+ "next@11.1.0/dist/client/route-loader.js - 3424158524:868049608",
+ "next@11.1.0/dist/client/route-loader.js - 3424158524:868049608",
+ "next@11.1.0/dist/client/router.js - 3424158524:60654157",
+ "next@11.1.0/dist/client/router.js - 3424158524:60654157",
+ "next@11.1.0/dist/client/router.js - 3424158524:60654157",
+ "next@11.1.0/dist/client/script.js - 3424158524:2971760940",
+ "next@11.1.0/dist/client/use-intersection.js - 3424158524:1893142411",
+ "next@11.1.0/dist/client/use-intersection.js - 3424158524:1893142411",
+ "next@11.1.0/dist/client/with-router.js - 3424158524:3574523301",
+ "next@11.1.0/dist/client/with-router.js - 3424158524:3574523301",
+ "next@11.1.0/dist/compiled/path-to-regexp/index.js - 3424158524:4292453228",
+ "next@11.1.0/dist/compiled/path-to-regexp/index.js - 3424158524:4292453228",
+ "next@11.1.0/dist/pages/_app.js - 3424158524:1831562171",
+ "next@11.1.0/dist/pages/_app.js - 3424158524:1831562171",
+ "next@11.1.0/dist/pages/_document.js - 3424158524:1843055786",
+ "next@11.1.0/dist/server/denormalize-page-path.js - 3424158524:2078268279",
+ "next@11.1.0/dist/server/denormalize-page-path.js - 3424158524:2078268279",
+ "next@11.1.0/dist/server/get-page-files.js - 3424158524:3103205117",
+ "next@11.1.0/dist/server/htmlescape.js - 3424158524:3619675719",
+ "next@11.1.0/dist/server/normalize-page-path.js - 3424158524:79382061",
+ "next@11.1.0/dist/server/utils.js - 3424158524:3170288217",
+ "next@11.1.0/dist/shared/lib/amp-context.js - 3424158524:2231212210",
+ "next@11.1.0/dist/shared/lib/amp-context.js - 3424158524:2231212210",
+ "next@11.1.0/dist/shared/lib/amp-context.js - 3424158524:2231212210",
+ "next@11.1.0/dist/shared/lib/amp.js - 3424158524:3972854680",
+ "next@11.1.0/dist/shared/lib/amp.js - 3424158524:3972854680",
+ "next@11.1.0/dist/shared/lib/constants.js - 3424158524:3766949957",
+ "next@11.1.0/dist/shared/lib/document-context.js - 3424158524:3503028665",
+ "next@11.1.0/dist/shared/lib/head-manager-context.js - 3424158524:99574170",
+ "next@11.1.0/dist/shared/lib/head-manager-context.js - 3424158524:99574170",
+ "next@11.1.0/dist/shared/lib/head-manager-context.js - 3424158524:99574170",
+ "next@11.1.0/dist/shared/lib/head-manager-context.js - 3424158524:99574170",
+ "next@11.1.0/dist/shared/lib/head.js - 3424158524:1660462722",
+ "next@11.1.0/dist/shared/lib/head.js - 3424158524:1660462722",
+ "next@11.1.0/dist/shared/lib/i18n/detect-domain-locale.js - 3424158524:2360522531",
+ "next@11.1.0/dist/shared/lib/i18n/normalize-locale-path.js - 3424158524:2987178093",
+ "next@11.1.0/dist/shared/lib/i18n/normalize-locale-path.js - 3424158524:2987178093",
+ "next@11.1.0/dist/shared/lib/loadable-context.js - 3424158524:3504182001",
+ "next@11.1.0/dist/shared/lib/loadable-context.js - 3424158524:3504182001",
+ "next@11.1.0/dist/shared/lib/loadable.js - 3424158524:3055601316",
+ "next@11.1.0/dist/shared/lib/mitt.js - 3424158524:697603371",
+ "next@11.1.0/dist/shared/lib/mitt.js - 3424158524:697603371",
+ "next@11.1.0/dist/shared/lib/mitt.js - 3424158524:697603371",
+ "next@11.1.0/dist/shared/lib/router-context.js - 3424158524:2677379782",
+ "next@11.1.0/dist/shared/lib/router-context.js - 3424158524:2677379782",
+ "next@11.1.0/dist/shared/lib/router-context.js - 3424158524:2677379782",
+ "next@11.1.0/dist/shared/lib/router-context.js - 3424158524:2677379782",
+ "next@11.1.0/dist/shared/lib/router/router.js - 3424158524:784078930",
+ "next@11.1.0/dist/shared/lib/router/router.js - 3424158524:784078930",
+ "next@11.1.0/dist/shared/lib/router/router.js - 3424158524:784078930",
+ "next@11.1.0/dist/shared/lib/router/utils/format-url.js - 3424158524:2249819031",
+ "next@11.1.0/dist/shared/lib/router/utils/format-url.js - 3424158524:2249819031",
+ "next@11.1.0/dist/shared/lib/router/utils/get-asset-path-from-route.js - 3424158524:1494341198",
+ "next@11.1.0/dist/shared/lib/router/utils/get-asset-path-from-route.js - 3424158524:1494341198",
+ "next@11.1.0/dist/shared/lib/router/utils/get-asset-path-from-route.js - 3424158524:1494341198",
+ "next@11.1.0/dist/shared/lib/router/utils/is-dynamic.js - 3424158524:3652061346",
+ "next@11.1.0/dist/shared/lib/router/utils/is-dynamic.js - 3424158524:3652061346",
+ "next@11.1.0/dist/shared/lib/router/utils/is-dynamic.js - 3424158524:3652061346",
+ "next@11.1.0/dist/shared/lib/router/utils/parse-relative-url.js - 3424158524:84921275",
+ "next@11.1.0/dist/shared/lib/router/utils/parse-relative-url.js - 3424158524:84921275",
+ "next@11.1.0/dist/shared/lib/router/utils/parse-url.js - 3424158524:2943870410",
+ "next@11.1.0/dist/shared/lib/router/utils/parse-url.js - 3424158524:2943870410",
+ "next@11.1.0/dist/shared/lib/router/utils/path-match.js - 3424158524:1335539408",
+ "next@11.1.0/dist/shared/lib/router/utils/path-match.js - 3424158524:1335539408",
+ "next@11.1.0/dist/shared/lib/router/utils/prepare-destination.js - 3424158524:2905198601",
+ "next@11.1.0/dist/shared/lib/router/utils/prepare-destination.js - 3424158524:2905198601",
+ "next@11.1.0/dist/shared/lib/router/utils/querystring.js - 3424158524:2585795157",
+ "next@11.1.0/dist/shared/lib/router/utils/querystring.js - 3424158524:2585795157",
+ "next@11.1.0/dist/shared/lib/router/utils/querystring.js - 3424158524:2585795157",
+ "next@11.1.0/dist/shared/lib/router/utils/resolve-rewrites.js - 3424158524:2049321565",
+ "next@11.1.0/dist/shared/lib/router/utils/resolve-rewrites.js - 3424158524:2049321565",
+ "next@11.1.0/dist/shared/lib/router/utils/route-matcher.js - 3424158524:3388378419",
+ "next@11.1.0/dist/shared/lib/router/utils/route-matcher.js - 3424158524:3388378419",
+ "next@11.1.0/dist/shared/lib/router/utils/route-regex.js - 3424158524:1570670727",
+ "next@11.1.0/dist/shared/lib/router/utils/route-regex.js - 3424158524:1570670727",
+ "next@11.1.0/dist/shared/lib/runtime-config.js - 3424158524:4205818429",
+ "next@11.1.0/dist/shared/lib/side-effect.js - 3424158524:3871282960",
+ "next@11.1.0/dist/shared/lib/side-effect.js - 3424158524:3871282960",
+ "next@11.1.0/dist/shared/lib/utils.js - 3424158524:2498823793",
+ "next@11.1.0/dist/shared/lib/utils.js - 3424158524:2498823793",
+ "next@11.1.0/dist/shared/lib/utils.js - 3424158524:2498823793",
+ "next@11.1.0/dist/shared/lib/utils.js - 3424158524:2498823793",
+ "next@11.1.0/document.js - 3424158524:761357561",
+ "next@11.1.0/head.js - 3424158524:4027675732",
+ "next@11.1.0/head.js - 3424158524:4027675732",
+ "next@11.1.0/link.js - 3424158524:3847679594",
+ "next@11.1.0/link.js - 3424158524:3847679594",
+ "next@11.1.0/router.js - 3424158524:2467530242",
+ "next@11.1.0/router.js - 3424158524:2467530242",
+ "object-assign@4.1.1/index.js - 1106322050:1257305923",
+ "object-assign@4.1.1/index.js - 1106322050:1257305923",
+ "react-dom@17.0.2/cjs/react-dom-server.browser.development.js - 2917057216:4251258747",
+ "react-dom@17.0.2/cjs/react-dom.development.js - 2917057216:2729826485",
+ "react-dom@17.0.2/index.js - 2917057216:4152798548",
+ "react-dom@17.0.2/server.browser.js - 2917057216:2336742101",
+ "react-is@17.0.2/cjs/react-is.development.js - 1177198225:1925584658",
+ "react-is@17.0.2/cjs/react-is.development.js - 1177198225:1925584658",
+ "react-is@17.0.2/index.js - 1177198225:3919220786",
+ "react-is@17.0.2/index.js - 1177198225:3919220786",
+ "react-is@17.0.2/index.js - 1177198225:3919220786",
+ "react-refresh@0.8.3/cjs/react-refresh-runtime.development.js - 1106322050:2742290347",
+ "react-refresh@0.8.3/runtime.js - 1106322050:1039122438",
+ "react@17.0.2/cjs/react-jsx-dev-runtime.development.js - 2465707714:1705570593",
+ "react@17.0.2/cjs/react-jsx-dev-runtime.development.js - 2465707714:1705570593",
+ "react@17.0.2/cjs/react.development.js - 2465707714:1390143369",
+ "react@17.0.2/cjs/react.development.js - 2465707714:1390143369",
+ "react@17.0.2/index.js - 2465707714:1063423392",
+ "react@17.0.2/index.js - 2465707714:1063423392",
+ "react@17.0.2/index.js - 2465707714:1063423392",
+ "react@17.0.2/index.js - 2465707714:1063423392",
+ "react@17.0.2/jsx-dev-runtime.js - 2465707714:3464951857",
+ "react@17.0.2/jsx-dev-runtime.js - 2465707714:3464951857",
+ "scheduler@0.20.2/cjs/scheduler-tracing.development.js - 2917057216:1128698082",
+ "scheduler@0.20.2/cjs/scheduler.development.js - 2917057216:4082470097",
+ "scheduler@0.20.2/index.js - 2917057216:3977196876",
+ "scheduler@0.20.2/tracing.js - 2917057216:2401030364",
+ "string-hash@1.1.3/index.js - 2958931479:1647663124",
+ "styled-jsx@4.0.0/dist/lib/stylesheet.js - 2917057216:205078822",
+ "styled-jsx@4.0.0/dist/server.js - 2917057216:2807236644",
+ "styled-jsx@4.0.0/dist/style.js - 2917057216:3820693621",
+ "styled-jsx@4.0.0/dist/stylesheet-registry.js - 2917057216:2283650446",
+ "styled-jsx@4.0.0/server.js - 2917057216:3921567966",
+ "use-subscription@1.5.1/cjs/use-subscription.development.js - 1836582978:3015515293",
+ "use-subscription@1.5.1/index.js - 1836582978:2982917928",
+};