bare-module 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -127,6 +127,9 @@ Condition | Description
127
127
  `"node"` |
128
128
  `"import"` |
129
129
  `"require"` |
130
+ `"<platform>"` |
131
+ `"<arch>"` |
132
+ `"simulator"` |
130
133
  `"default"` |
131
134
 
132
135
  ##### Self-referencing
package/index.js CHANGED
@@ -237,7 +237,7 @@ const Module = module.exports = exports = class Module {
237
237
  static _protocol = null
238
238
  static _cache = module.cache || Object.create(null)
239
239
  static _modules = new Set()
240
- static _conditions = ['bare', 'node']
240
+ static _conditions = ['bare', 'node', Bare.platform, Bare.arch]
241
241
 
242
242
  static _handle = binding.init(this, this._onimport, this._onevaluate, this._onmeta)
243
243
 
@@ -597,6 +597,8 @@ const createRequire = exports.createRequire = function createRequire (parentURL,
597
597
  }
598
598
  }
599
599
 
600
+ if (Bare.simulator) Module._conditions.push('simulator')
601
+
600
602
  Module._extensions['.js'] = function (module, source, referrer) {
601
603
  const self = Module
602
604
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-module",
3
- "version": "4.0.0",
3
+ "version": "4.1.1",
4
4
  "description": "Module support for JavaScript",
5
5
  "main": "index.js",
6
6
  "files": [