alloy 1.16.3 → 1.17.2

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.
@@ -9,7 +9,7 @@ var U = require('../../utils'),
9
9
  astController = require('./ast/controller'),
10
10
  _ = require('lodash'),
11
11
  styler = require('./styler'),
12
- XMLSerializer = require('xmldom').XMLSerializer,
12
+ XMLSerializer = require('@xmldom/xmldom').XMLSerializer,
13
13
  CONST = require('../../common/constants'),
14
14
  sourceMapper = require('./sourceMapper');
15
15
 
@@ -60,9 +60,20 @@ exports.generateCodeAndSourceMap = function(generator, compileConfig) {
60
60
  var relativeOutfile = path.relative(compileConfig.dir.project, outfile);
61
61
  var markers = _.map(data, function(v, k) { return k; });
62
62
  var mapper = new SM.SourceMapGenerator({
63
- file: `${compileConfig.dir.project}/${relativeOutfile}`,
63
+ file: path.join(compileConfig.dir.project, relativeOutfile),
64
64
  sourceRoot: compileConfig.dir.project
65
65
  });
66
+ // try to lookup the filename, falling back to the output file if we can't determine it
67
+ let filename;
68
+ if (data.__MAPMARKER_CONTROLLER_CODE__ && data.__MAPMARKER_CONTROLLER_CODE__.filename) {
69
+ filename = data.__MAPMARKER_CONTROLLER_CODE__.filename;
70
+ } else if (data.__MAPMARKER_ALLOY_JS__ && data.__MAPMARKER_ALLOY_JS__.filename) {
71
+ filename = data.__MAPMARKER_ALLOY_JS__.filename;
72
+ } else if (data.__MAPMARKER_NONCONTROLLER__ && data.__MAPMARKER_NONCONTROLLER__.filename) {
73
+ filename = data.__MAPMARKER_NONCONTROLLER__.filename;
74
+ } else {
75
+ filename = target.filename;
76
+ }
66
77
  // the line counter and code string for the generated file
67
78
  var genMap = {
68
79
  count: 1,
@@ -124,7 +135,8 @@ exports.generateCodeAndSourceMap = function(generator, compileConfig) {
124
135
  plugins: [
125
136
  [require('./ast/builtins-plugin'), compileConfig],
126
137
  [require('./ast/optimizer-plugin'), compileConfig.alloyConfig]
127
- ]
138
+ ],
139
+ filename
128
140
  });
129
141
  if (compileConfig.sourcemap) {
130
142
  // Tell babel to retain the lines so they stay correct (columns go wacky, but OH WELL)
@@ -161,7 +173,7 @@ exports.generateSourceMap = function(generator, compileConfig) {
161
173
  var origFile = generator.origFile;
162
174
  var markers = _.map(data, function(v, k) { return k; });
163
175
  var mapper = new SM.SourceMapGenerator({
164
- file: `${compileConfig.dir.project}/${target.filename}`,
176
+ file: path.join(compileConfig.dir.project, target.filename),
165
177
  sourceRoot: compileConfig.dir.project
166
178
  });
167
179
  var genMap = {
@@ -2,7 +2,7 @@ var U = require('../../utils'),
2
2
  logger = require('../../logger'),
3
3
  path = require('path'),
4
4
  _ = require('lodash'),
5
- XMLSerializer = require('xmldom').XMLSerializer,
5
+ XMLSerializer = require('@xmldom/xmldom').XMLSerializer,
6
6
  fs = require('fs-extra'),
7
7
  os = require('os');
8
8
 
@@ -5,5 +5,6 @@
5
5
  "env:production": {},
6
6
  "os:android": {},
7
7
  "os:ios": {},
8
- "dependencies": {}
8
+ "dependencies": {},
9
+ "backbone": "1.4.0"
9
10
  }
package/Alloy/tiapp.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var fs = require('fs'),
2
2
  path = require('path'),
3
- XMLSerializer = require('xmldom').XMLSerializer,
3
+ XMLSerializer = require('@xmldom/xmldom').XMLSerializer,
4
4
  pkg = require('../package'),
5
5
  U = require('./utils'),
6
6
  CONST = require('./common/constants'),
package/Alloy/utils.js CHANGED
@@ -11,8 +11,8 @@ var path = require('path'),
11
11
  paths = require('global-paths'),
12
12
  logger = require('./logger'),
13
13
  tiapp = require('./tiapp'),
14
- XMLSerializer = require('xmldom').XMLSerializer,
15
- DOMParser = require('xmldom').DOMParser,
14
+ XMLSerializer = require('@xmldom/xmldom').XMLSerializer,
15
+ DOMParser = require('@xmldom/xmldom').DOMParser,
16
16
  _ = require('lodash'),
17
17
  CONST = require('./common/constants'),
18
18
  sourceMapper = require('./commands/compile/sourceMapper'),
package/CHANGELOG.md CHANGED
@@ -1,3 +1,36 @@
1
+ ## [1.17.2](https://github.com/appcelerator/alloy/compare/1.17.1...1.17.2) (2022-01-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** bump xmldom to 0.8.0 ([#1270](https://github.com/appcelerator/alloy/issues/1270)) ([d0a4299](https://github.com/appcelerator/alloy/commit/d0a42991a02b1535d2e5d933365d67e9a3e81b63))
7
+
8
+ ## [1.17.1](https://github.com/appcelerator/alloy/compare/1.17.0...1.17.1) (2021-11-17)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **compile/hook:** error if unable to find the alloy cli ([166dc3b](https://github.com/appcelerator/alloy/commit/166dc3b61c2dba6fbeecf1d4d00a742dea15be99))
14
+
15
+ # [1.17.0](https://github.com/appcelerator/alloy/compare/1.16.4...1.17.0) (2021-11-02)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **compile/sourcemap:** use path.join rather than manually constructing a path ([537107d](https://github.com/appcelerator/alloy/commit/537107debd06930ed3ea932395e2654e4996db48))
21
+
22
+
23
+ ### Features
24
+
25
+ * **all:** set default backbone version ([fb845f7](https://github.com/appcelerator/alloy/commit/fb845f735be4ff6999807f14b740c37357145977))
26
+
27
+ ## [1.16.4](https://github.com/appcelerator/alloy/compare/1.16.3...1.16.4) (2021-09-17)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **compile:** provide filename to babel transform to allow using config files ([#1218](https://github.com/appcelerator/alloy/issues/1218)) ([ba0068e](https://github.com/appcelerator/alloy/commit/ba0068ed094906a474c3d6552e27b4e809414a2f))
33
+
1
34
  ## [1.16.3](https://github.com/appcelerator/alloy/compare/1.16.2...1.16.3) (2021-06-29)
2
35
 
3
36
 
package/hooks/alloy.js CHANGED
@@ -123,6 +123,12 @@ exports.init = function (logger, config, cli, appc) {
123
123
  };
124
124
  }), function () {
125
125
 
126
+ if (!paths.alloy) {
127
+ logger.error('The alloy CLI is not installed');
128
+ logger.error('Please install it with [sudo] npm i alloy -g');
129
+ process.exit(1);
130
+ }
131
+
126
132
  // compose alloy command execution
127
133
  var cmd = [paths.node, paths.alloy, 'compile', appDir, '--config', config];
128
134
  if (cli.argv['no-colors'] || cli.argv['color'] === false) { cmd.push('--no-colors'); }
@@ -194,8 +200,4 @@ exports.init = function (logger, config, cli, appc) {
194
200
 
195
201
  run(build.deviceFamily, deployType, target, finished);
196
202
  });
197
-
198
- cli.addHook('codeprocessor.pre.run', function (build, finished) {
199
- run('none', 'development', undefined, finished, SILENT);
200
- });
201
203
  };
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "html5",
13
13
  "appc-client"
14
14
  ],
15
- "version": "1.16.3",
15
+ "version": "1.17.2",
16
16
  "author": "Appcelerator, Inc. <info@appcelerator.com>",
17
17
  "maintainers": [
18
18
  {
@@ -36,6 +36,7 @@
36
36
  "@babel/traverse": "^7.4.5",
37
37
  "@babel/types": "^7.4.4",
38
38
  "@babel/template": "^7.4.4",
39
+ "@xmldom/xmldom": "^0.8.0",
39
40
  "async": "^3.2.0",
40
41
  "colors": "^1.1.2",
41
42
  "commander": "^8.0.0",
@@ -50,8 +51,7 @@
50
51
  "resolve": "^1.1.7",
51
52
  "source-map": "^0.7.3",
52
53
  "walk-sync": "^0.3.2",
53
- "xml2tss": "0.0.5",
54
- "xmldom": "^0.6.0"
54
+ "xml2tss": "0.0.5"
55
55
  },
56
56
  "license": "Apache-2.0",
57
57
  "bin": {
@@ -68,15 +68,15 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@seadub/danger-plugin-dependencies": "^1.0.0",
71
- "@seadub/danger-plugin-eslint": "^2.0.0",
72
- "@seadub/danger-plugin-junit": "^0.2.0",
73
- "@semantic-release/changelog": "^5.0.1",
74
- "@semantic-release/git": "^9.0.0",
71
+ "@seadub/danger-plugin-eslint": "^3.0.1",
72
+ "@seadub/danger-plugin-junit": "^0.3.0",
73
+ "@semantic-release/changelog": "^6.0.0",
74
+ "@semantic-release/git": "^10.0.0",
75
75
  "danger": "^10.5.0",
76
76
  "diff": "^5.0.0",
77
- "eslint": "^7.5.0",
77
+ "eslint": "^8.0.1",
78
78
  "jake": "^10.8.2",
79
- "semantic-release": "^17.1.2"
79
+ "semantic-release": "^18.0.0"
80
80
  },
81
81
  "release": {
82
82
  "tagFormat": "${version}",
@@ -6,5 +6,6 @@
6
6
  "os:android": {},
7
7
  "os:ios": {},
8
8
  "os:windows": {},
9
- "dependencies": {}
10
- }
9
+ "dependencies": {},
10
+ "backbone": "1.4.0"
11
+ }
@@ -6,5 +6,6 @@
6
6
  "os:android": {},
7
7
  "os:ios": {},
8
8
  "os:windows": {},
9
- "dependencies": {}
10
- }
9
+ "dependencies": {},
10
+ "backbone": "1.4.0"
11
+ }
@@ -6,5 +6,6 @@
6
6
  "os:android": {},
7
7
  "os:ios": {},
8
8
  "os:windows": {},
9
- "dependencies": {}
10
- }
9
+ "dependencies": {},
10
+ "backbone": "1.4.0"
11
+ }
@@ -1,6 +1,6 @@
1
1
  var fs = require('fs-extra'),
2
2
  path = require('path'),
3
- DOMParser = require('xmldom').DOMParser,
3
+ DOMParser = require('@xmldom/xmldom').DOMParser,
4
4
  TU = require('../lib/testUtils'),
5
5
  CONST = require('../../Alloy/common/constants'),
6
6
  platforms = require('../../platforms/index'),
@@ -2,7 +2,7 @@ var fs = require('fs'),
2
2
  path = require('path'),
3
3
  os = require('os'),
4
4
  exec = require('child_process').exec,
5
- DOMParser = require('xmldom').DOMParser,
5
+ DOMParser = require('@xmldom/xmldom').DOMParser,
6
6
  TU = require('../lib/testUtils'),
7
7
  U = require('../../Alloy/utils'),
8
8
  CU = require('../../Alloy/commands/compile/compilerUtils'),
package/test/specs/new.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var fs = require('fs-extra'),
2
2
  path = require('path'),
3
- DOMParser = require('xmldom').DOMParser,
3
+ DOMParser = require('@xmldom/xmldom').DOMParser,
4
4
  TU = require('../lib/testUtils'),
5
5
  CONST = require('../../Alloy/common/constants'),
6
6
  _ = require('lodash');