node_preamble
Better node.js preamble for dart2js, use it in your build system.
2.0.2
8.3M downloads/mo
#61 most downloaded on pub.dev
mbullington/node_preamble.dart
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 1.7 years
Most releases are documented
notes for 13 of 21 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
21 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
21 releases · Aug 2015 to Mar 2023Releases
latest 21-
2.0.201 Mar 2023Nothing published for this version
-
2.0.116 Jun 2021Nothing published for this version
-
2.0.003 Mar 2021Nothing published for this version
-
1.4.1325 Jan 2021Nothing published for this version
-
1.4.1210 Jun 2020Nothing published for this version
-
1.4.1110 Jun 2020Nothing published for this version
-
1.4.1003 Jun 2020Nothing published for this version
-
1.4.923 May 2020Release notes
Open source →- Change behavior of Node.js detection that now takes into account:
- Web workers in browser
- Electron
- Change behavior of Node.js detection that now takes into account:
-
1.4.810 Sep 2019 -
1.4.704 Sep 2019Release notes
Open source →Thanks! @lexaknyazev
- Move
urlmodule import to Node.js-only block. - Fix for when we try to load
urlon Node.js but are also using Webpack.
- Move
-
1.4.627 Jul 2019Release notes
Open source →- Make
location.hrefcompatible with Node versions earlier than 10.12.0 again.
- Make
-
1.4.522 Jul 2019Release notes
Open source →-
Improve
location.hrefso that Dart'sUri.currentworks for more paths.- Make
location.hrefa getter so Dart'sUri.currentchanges along with the process's working directory.
- Make
-
Fixes for Angular 6+ applications using compiled Dart package w/ preamble:
- Checks for global if it's not polyfilled, then try for window.
- Don't assume that since we have CommonJS we have process, __dirname, __filename.
-
-
1.4.424 Jul 2018 -
1.4.301 Jul 2018Release notes
Open source →- Add Node detector for Browserify/Webpack-type environments. (thanks to @lexaknyazev for reporting!)
- Add examples for pub (thanks @bcko!)
-
1.4.225 May 2018Release notes
Open source →- Keep
Uri.baseup to date when the current working directory changes. - Add .dart_tool to gitignore.
- Keep
-
1.4.125 Apr 2018Release notes
Open source →- Make sure to replace all backslashes for cwd on Windows, not just the first.
-
1.4.030 Jun 2017Release notes
Open source →- Add __dirname and __filename to exposed globals. Adds ability of exposing more
globals in the preamble by calling
getPreamble(additionalGlobals: ["__dirname", ...]).
- Add __dirname and __filename to exposed globals. Adds ability of exposing more
globals in the preamble by calling
-
1.3.012 Mar 2017Release notes
Open source →- Add minified versions of the preamble accessible as
lib/preamble.min.jsand by callinggetPreamble(minified: true).
- Add minified versions of the preamble accessible as
-
1.2.003 Dec 2016Release notes
Open source →- Prevent encapsulation,
global.self = global(old) vs.var self = Object.create(global)(new).
- Prevent encapsulation,
-
1.1.002 Dec 2016Release notes
Open source →-
Set
global.locationso thatUri.base()works properly on Windows in most cases. -
Define
global.exportsso that it's visible to the compiled JS.
-
-
1.0.024 Aug 2015Nothing published for this version