@marko/translator-default 5.25.9 → 5.26.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,18 @@
1
1
  "use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule = true;exports.default = void 0;var _compiler = require("@marko/compiler");
2
- var _withPreviousLocation = _interopRequireDefault(require("../../util/with-previous-location"));var _default =
2
+ var _withPreviousLocation = _interopRequireDefault(require("../../util/with-previous-location"));
3
+ var _babelUtils = require("@marko/babel-utils");var _default =
3
4
 
4
5
  {
5
6
  ReferencedIdentifier(path) {
6
7
  if (path.node.name === "data" && !path.scope.hasBinding("data")) {
7
- path.replaceWith((0, _withPreviousLocation.default)(_compiler.types.identifier("input"), path.node));
8
+ (0, _babelUtils.diagnosticDeprecate)(path, {
9
+ label: "The 'data' variable is deprecated. Use 'input' instead.",
10
+ fix() {
11
+ path.replaceWith(
12
+ (0, _withPreviousLocation.default)(_compiler.types.identifier("input"), path.node));
13
+
14
+ }
15
+ });
8
16
  }
9
17
  }
10
18
  };exports.default = _default;
@@ -4,7 +4,7 @@ var _compiler = require("@marko/compiler");
4
4
  var _babelUtils = require("@marko/babel-utils");var _default =
5
5
 
6
6
  (entryFile, isHydrate) => {
7
- const { modules, resolveVirtualDependency, hydrateIncludeImports } =
7
+ const { resolveVirtualDependency, hydrateIncludeImports } =
8
8
  entryFile.markoOpts;
9
9
  const hydratedFiles = new Set();
10
10
  const program = entryFile.path;
@@ -164,12 +164,6 @@ var _babelUtils = require("@marko/babel-utils");var _default =
164
164
  }
165
165
 
166
166
  function importPath(path) {
167
- if (modules === "cjs") {
168
- return _compiler.types.expressionStatement(
169
- _compiler.types.callExpression(_compiler.types.identifier("require"), [_compiler.types.stringLiteral(path)]));
170
-
171
- }
172
-
173
167
  return _compiler.types.importDeclaration([], _compiler.types.stringLiteral(path));
174
168
  }
175
169
  };exports.default = _default;
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@marko/translator-default",
3
3
  "description": "Translates Marko templates to the default Marko runtime.",
4
- "version": "5.25.9",
4
+ "version": "5.26.1",
5
5
  "author": "Dylan Piercey <dpiercey@ebay.com>",
6
6
  "bugs": "https://github.com/marko-js/marko/issues/new?template=Bug_report.md",
7
7
  "dependencies": {
8
8
  "@babel/runtime": "^7.16.0",
9
- "@marko/babel-utils": "^5.21.4",
9
+ "@marko/babel-utils": "^5.22.0",
10
10
  "escape-string-regexp": "^4.0.0",
11
11
  "magic-string": "^0.27.0",
12
12
  "self-closing-tags": "^1.0.1"
13
13
  },
14
14
  "devDependencies": {
15
- "@marko/compiler": "^5.27.8",
16
- "marko": "^5.25.17"
15
+ "@marko/compiler": "^5.28.1",
16
+ "marko": "^5.26.1"
17
17
  },
18
18
  "files": [
19
19
  "dist",