superconf 1.4.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superconf",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "Smart configuration loader",
5
5
  "main": "app.js",
6
6
  "scripts": {
package/src/Legacy.js CHANGED
@@ -49,6 +49,12 @@ class Superconf {
49
49
  }
50
50
 
51
51
  tryFiles (name) {
52
+ try {
53
+ throw new Error('superconf.tryFiles() is deprecated. Use .load() instead')
54
+ } catch (err) {
55
+ console.error(err.stack)
56
+ }
57
+
52
58
  if (!name) {
53
59
  throw new Error('Name arg must be set!')
54
60
  }
package/src/app.fire CHANGED
@@ -1,19 +1,11 @@
1
1
  import Superconf from './Superconf'
2
2
 
3
- func superconf (name, opts)
4
-
5
- const defaultExports = module.exports
6
3
  module.exports = (name, opts) =>
7
4
  log 'Superconf: Import namespace method is deprecated. Use named imports instead'
8
5
  const config = new Superconf(opts)
9
6
  return config.tryFiles(name)
10
7
 
11
- Object.assign(module.exports, defaultExports)
12
- export ** superconf
13
-
14
- export
15
- Superconf
16
- superconf
8
+ export Superconf
17
9
 
18
10
  export func config (opts)
19
11
  # log 'Superconf: Import of config() method is deprecated. Use named imports instead'