Browse Source

sdk: Remove some deprecations.

Move amber requirement to up-to-date.
Herby Vojčík 5 years ago
parent
commit
3ba5601a84
2 changed files with 5 additions and 9 deletions
  1. 4 8
      sdk/lib/amberc.js
  2. 1 1
      sdk/package.json

+ 4 - 8
sdk/lib/amberc.js

@@ -87,11 +87,7 @@ AmberCompiler.prototype.main = function (configuration, finished_callback) {
     }
 
     if (!rjsConfig.paths.amber) {
-        // TODO remove backward compatibility, prefer 'base'
-        rjsConfig.paths.amber = path.join(this.amber_dir, 'support');
-        if (!fs.existsSync(rjsConfig.paths.amber)) {
-            rjsConfig.paths.amber = path.join(this.amber_dir, 'base');
-        }
+        rjsConfig.paths.amber = path.join(this.amber_dir, 'base');
     }
     if (!rjsConfig.paths.amber_core) rjsConfig.paths.amber_core = path.join(this.amber_dir, 'src');
     rjsConfig.paths['text'] = require.resolve('requirejs-text').replace(/\.js$/, "");
@@ -216,9 +212,9 @@ function create_compiler(configuration) {
             return new Promise(configuration.requirejs.bind(null, pluginPrefixedLibraries));
         })
         .then(function () {
-            // TODO remove deprecated method name
-            (configuration.globals.Smalltalk._adoptPackageDictionary || configuration.globals.Smalltalk._adoptPackageDescriptors).call(configuration.globals.Smalltalk);
-
+            return configuration.globals.Smalltalk._adoptPackageDescriptors();
+        })
+        .then(function () {
             console.log('Compiler loaded');
 
             configuration.jsGlobals.forEach(function (each) {

+ 1 - 1
sdk/package.json

@@ -11,7 +11,7 @@
     "url": "https://lolg.it/amber/amber.git"
   },
   "engines": {
-    "amber": ">=0.19.1",
+    "amber": ">=0.22.4",
     "node": ">=4.0.0"
   },
   "author": "",