deno icon indicating copy to clipboard operation
deno copied to clipboard

`deno publish` triple slash directions allowed in dry-run.

Open littledivy opened this issue 1 year ago • 1 comments

divy@mini ~/g/pasteboard (main)> deno publish
Checking fast check type graph for errors...
Ensuring type checks...
Check file:///Users/divy/gh/pasteboard/pasteboard.ts
Visit https://jsr.io/auth?code=XXXX to authorize publishing of @divy/pasteboard
Waiting...
Authorization successful. Authenticated as Divy Srivastava
Publishing @divy/[email protected] ...
giterror: Failed to publish @divy/[email protected]

Caused by:
    Failed to publish @divy/pasteboard at 0.0.1: Triple slash directives that modify globals (for example, '/// <reference no-default-lib="true" />' or '/// <reference lib="dom" />') are not allowed. Instead instruct the user of your package to specify these directives. file:///objc.ts:15:1

objc.ts had a triple slash directive:

/// <reference lib="deno.unstable" />

The issue is that dry run passes.

littledivy avatar Feb 06 '24 06:02 littledivy

CC @dsherret is this check done only server-side?

bartlomieju avatar Feb 06 '24 18:02 bartlomieju

Yes, that's right. We should also do this check during publishing

lucacasonato avatar Jun 17 '24 14:06 lucacasonato