denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98.26k stars 5.41k forks source link

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

Open littledivy opened 10 months ago

littledivy commented 10 months ago
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/pasteboard@0.0.1 ...
giterror: Failed to publish @divy/pasteboard@0.0.1

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.

bartlomieju commented 10 months ago

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

lucacasonato commented 5 months ago

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