Scoping rules are different for app vs packages.
In app, every file has its own scope and the global scope is app-wise.
In package, every file has its own scope, global scope is package-wise, explicitly exported values (in package.js) are available app-wise.