postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.82k stars 837 forks source link

Small enhancement to the package creation boilerplate comments could be helpful #13136

Open bennettatoms opened 2 weeks ago

bennettatoms commented 2 weeks ago

Is there an existing issue for this?

Describe the Issue

Just created and used my first package, and it works great but took a little longer than it needed to to get it working. Spent 15 or 20 minutes trying to debug but kept seeing the following in the console:

Error: Cannot find package '{mypackage}' Ultimately I found the helpdoc that illuminated the answer: https://learning.postman.com/docs/tests-and-scripts/write-scripts/package-library/#add-a-new-package

Which explains that, instead of this, which is what the default boilerplate comments in the new package show:

// Once exported, use this statement in your scripts to use the package.
// const myPackage = pm.require('<package_name>')

I needed this:

// Once exported, use this statement in your scripts to use the package.
// const myPackage = pm.require('@<team_name>/<package_name>')

Just feedback on a small improvement that could save people time and help adopt the feature.

Steps To Reproduce

  1. Go to Package Library
  2. Create New Package
  3. Boilerplate code comments appear in the code editor

Screenshots or Videos

No response

Operating System

macOS

Postman Version

11.11.1

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response