summaryrefslogtreecommitdiff
path: root/tests/specs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-04 20:41:01 -0400
committerGitHub <noreply@github.com>2024-07-05 00:41:01 +0000
commitf396b3d1c8aaa7bf40fb1960f9ec81c3708ea2a8 (patch)
treed86b8190d9273c676063552c478ebf7ae32bd5b1 /tests/specs
parentf00f0f92983d6966a5b97e539ec3f3407c3d851f (diff)
fix(publish): unfurling should always be done with the package json (#24435)
Closes https://github.com/denoland/deno/issues/24430
Diffstat (limited to 'tests/specs')
-rw-r--r--tests/specs/publish/byonm_with_package_json/__test__.jsonc13
-rw-r--r--tests/specs/publish/byonm_with_package_json/jsr.json12
-rw-r--r--tests/specs/publish/byonm_with_package_json/package.json8
-rw-r--r--tests/specs/publish/byonm_with_package_json/publish.out3
-rw-r--r--tests/specs/publish/byonm_with_package_json/src/index.ts3
5 files changed, 39 insertions, 0 deletions
diff --git a/tests/specs/publish/byonm_with_package_json/__test__.jsonc b/tests/specs/publish/byonm_with_package_json/__test__.jsonc
new file mode 100644
index 000000000..77c23bae1
--- /dev/null
+++ b/tests/specs/publish/byonm_with_package_json/__test__.jsonc
@@ -0,0 +1,13 @@
+{
+ "envs": {
+ "DENO_FUTURE": "1"
+ },
+ "tempDir": true,
+ "steps": [{
+ "args": "install",
+ "output": "[WILDCARD]"
+ }, {
+ "args": "publish --log-level=debug --dry-run --allow-dirty",
+ "output": "publish.out"
+ }]
+}
diff --git a/tests/specs/publish/byonm_with_package_json/jsr.json b/tests/specs/publish/byonm_with_package_json/jsr.json
new file mode 100644
index 000000000..c92b1a60c
--- /dev/null
+++ b/tests/specs/publish/byonm_with_package_json/jsr.json
@@ -0,0 +1,12 @@
+{
+ "name": "@scope/package",
+ "version": "0.0.0",
+ "exports": {
+ ".": "./src/index.ts"
+ },
+ "publish": {
+ "include": [
+ "src/**/*"
+ ]
+ }
+}
diff --git a/tests/specs/publish/byonm_with_package_json/package.json b/tests/specs/publish/byonm_with_package_json/package.json
new file mode 100644
index 000000000..eb93c075e
--- /dev/null
+++ b/tests/specs/publish/byonm_with_package_json/package.json
@@ -0,0 +1,8 @@
+{
+ "name": "@scope/pkg",
+ "module": "src/index.ts",
+ "type": "module",
+ "dependencies": {
+ "@denotest/add": "1"
+ }
+}
diff --git a/tests/specs/publish/byonm_with_package_json/publish.out b/tests/specs/publish/byonm_with_package_json/publish.out
new file mode 100644
index 000000000..6ce644bac
--- /dev/null
+++ b/tests/specs/publish/byonm_with_package_json/publish.out
@@ -0,0 +1,3 @@
+[WILDCARD]Unfurled specifier: @denotest/add from [WILDLINE]/src/index.ts -> npm:@denotest/add@1
+[WILDCARD]
+Warning Aborting due to --dry-run
diff --git a/tests/specs/publish/byonm_with_package_json/src/index.ts b/tests/specs/publish/byonm_with_package_json/src/index.ts
new file mode 100644
index 000000000..1ca631410
--- /dev/null
+++ b/tests/specs/publish/byonm_with_package_json/src/index.ts
@@ -0,0 +1,3 @@
+import { add } from "@denotest/add";
+
+console.log(add(1, 2));