@angular/google-maps 19.2.1 → 20.0.0-next.0

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": "@angular/google-maps",
3
- "version": "19.2.1",
3
+ "version": "20.0.0-next.0",
4
4
  "description": "Angular Google Maps",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "tslib": "^2.3.0"
22
22
  },
23
23
  "peerDependencies": {
24
- "@angular/core": "^19.0.0 || ^20.0.0",
25
- "@angular/common": "^19.0.0 || ^20.0.0",
24
+ "@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
25
+ "@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
26
26
  "rxjs": "^6.5.3 || ^7.4.0"
27
27
  },
28
28
  "sideEffects": false,
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schematics": {
3
- "migration-v19": {
4
- "version": "19.0.0-0",
5
- "description": "Updates the Angular Google Maps package to v19",
6
- "factory": "./ng-update/index_bundled#updateToV19"
3
+ "migration-v20": {
4
+ "version": "20.0.0-0",
5
+ "description": "Updates the Angular Google Maps package to v20",
6
+ "factory": "./ng-update/index_bundled#updateToV20"
7
7
  }
8
8
  }
9
9
  }
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,99 +14,19 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
- mod
22
- ));
23
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
18
 
25
- // bazel-out/k8-fastbuild/bin/src/google-maps/schematics/ng-update/index.mjs
19
+ // bazel-out/darwin_arm64-fastbuild/bin/src/google-maps/schematics/ng-update/index.mjs
26
20
  var ng_update_exports = {};
27
21
  __export(ng_update_exports, {
28
- updateToV19: () => updateToV19
22
+ updateToV20: () => updateToV20
29
23
  });
30
24
  module.exports = __toCommonJS(ng_update_exports);
31
- var import_typescript = __toESM(require("typescript"), 1);
32
- var TAG_NAME = "map-marker-clusterer";
33
- var MODULE_NAME = "@angular/google-maps";
34
- var CLASS_NAME = "MapMarkerClusterer";
35
- var DEPRECATED_CLASS_NAME = "DeprecatedMapMarkerClusterer";
36
- function updateToV19() {
37
- return (tree) => {
38
- tree.visit((path) => {
39
- var _a;
40
- if (path.includes("node_modules")) {
41
- return;
42
- }
43
- if (path.endsWith(".html")) {
44
- const content = (_a = tree.read(path)) == null ? void 0 : _a.toString();
45
- if (content && content.includes("<" + TAG_NAME)) {
46
- tree.overwrite(path, migrateHtml(content));
47
- }
48
- } else if (path.endsWith(".ts") && !path.endsWith(".d.ts")) {
49
- migrateTypeScript(path, tree);
50
- }
51
- });
52
- };
53
- }
54
- function migrateHtml(content) {
55
- return content.replace(/<map-marker-clusterer/g, "<deprecated-map-marker-clusterer").replace(/<\/map-marker-clusterer/g, "</deprecated-map-marker-clusterer");
56
- }
57
- function migrateTypeScript(path, tree) {
58
- var _a;
59
- const content = (_a = tree.read(path)) == null ? void 0 : _a.toString();
60
- if (!content || !content.includes("<" + TAG_NAME) && !content.includes(MODULE_NAME) && !content.includes(CLASS_NAME)) {
61
- return;
62
- }
63
- const sourceFile = import_typescript.default.createSourceFile(path, content, import_typescript.default.ScriptTarget.Latest, true);
64
- const toMigrate = findTypeScriptNodesToMigrate(sourceFile);
65
- if (toMigrate.length === 0) {
66
- return;
67
- }
68
- const printer = import_typescript.default.createPrinter();
69
- const update = tree.beginUpdate(path);
70
- for (const node of toMigrate) {
71
- let replacement;
72
- if (import_typescript.default.isStringLiteralLike(node)) {
73
- if (import_typescript.default.isStringLiteral(node)) {
74
- replacement = import_typescript.default.factory.createStringLiteral(migrateHtml(node.text), node.getText()[0] === `'`);
75
- } else {
76
- replacement = import_typescript.default.factory.createNoSubstitutionTemplateLiteral(migrateHtml(node.text));
77
- }
78
- } else {
79
- const propertyName = import_typescript.default.factory.createIdentifier(DEPRECATED_CLASS_NAME);
80
- const name = node.name;
81
- replacement = import_typescript.default.isImportSpecifier(node) ? import_typescript.default.factory.updateImportSpecifier(node, node.isTypeOnly, propertyName, name) : import_typescript.default.factory.updateExportSpecifier(node, node.isTypeOnly, propertyName, name);
82
- }
83
- update.remove(node.getStart(), node.getWidth()).insertLeft(node.getStart(), printer.printNode(import_typescript.default.EmitHint.Unspecified, replacement, sourceFile));
84
- }
85
- tree.commitUpdate(update);
86
- }
87
- function findTypeScriptNodesToMigrate(sourceFile) {
88
- const results = [];
89
- sourceFile.forEachChild(function walk(node) {
90
- var _a;
91
- if (import_typescript.default.isStringLiteral(node) && node.text.includes("<" + TAG_NAME)) {
92
- results.push(node);
93
- } else if ((import_typescript.default.isImportDeclaration(node) || import_typescript.default.isExportDeclaration(node)) && node.moduleSpecifier && import_typescript.default.isStringLiteralLike(node.moduleSpecifier) && node.moduleSpecifier.text === MODULE_NAME) {
94
- const bindings = import_typescript.default.isImportDeclaration(node) ? (_a = node.importClause) == null ? void 0 : _a.namedBindings : node.exportClause;
95
- if (bindings && (import_typescript.default.isNamedImports(bindings) || import_typescript.default.isNamedExports(bindings))) {
96
- bindings.elements.forEach((element) => {
97
- const symbolName = element.propertyName || element.name;
98
- if (import_typescript.default.isIdentifier(symbolName) && symbolName.text === CLASS_NAME) {
99
- results.push(element);
100
- }
101
- });
102
- }
103
- } else {
104
- node.forEachChild(walk);
105
- }
106
- });
107
- return results.sort((a, b) => b.getStart() - a.getStart());
25
+ function updateToV20() {
108
26
  }
109
27
  // Annotate the CommonJS export names for ESM import in node:
110
28
  0 && (module.exports = {
111
- updateToV19
29
+ updateToV20
112
30
  });
113
31
  /**
114
32
  * @license
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/google-maps/schematics/ng-update/index.ts"],
4
- "sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Path} from '@angular-devkit/core';\nimport {Rule, Tree} from '@angular-devkit/schematics';\nimport ts from 'typescript';\n\n/** Tag name of the clusterer component. */\nconst TAG_NAME = 'map-marker-clusterer';\n\n/** Module from which the clusterer is being imported. */\nconst MODULE_NAME = '@angular/google-maps';\n\n/** Old name of the clusterer class. */\nconst CLASS_NAME = 'MapMarkerClusterer';\n\n/** New name of the clusterer class. */\nconst DEPRECATED_CLASS_NAME = 'DeprecatedMapMarkerClusterer';\n\n/** Entry point for the migration schematics with target of Angular Material v19 */\nexport function updateToV19(): Rule {\n return tree => {\n tree.visit(path => {\n if (path.includes('node_modules')) {\n return;\n }\n\n if (path.endsWith('.html')) {\n const content = tree.read(path)?.toString();\n\n if (content && content.includes('<' + TAG_NAME)) {\n tree.overwrite(path, migrateHtml(content));\n }\n } else if (path.endsWith('.ts') && !path.endsWith('.d.ts')) {\n migrateTypeScript(path, tree);\n }\n });\n };\n}\n\n/** Migrates an HTML template from the old tag name to the new one. */\nfunction migrateHtml(content: string): string {\n return content\n .replace(/<map-marker-clusterer/g, '<deprecated-map-marker-clusterer')\n .replace(/<\\/map-marker-clusterer/g, '</deprecated-map-marker-clusterer');\n}\n\n/** Migrates a TypeScript file from the old tag and class names to the new ones. */\nfunction migrateTypeScript(path: Path, tree: Tree) {\n const content = tree.read(path)?.toString();\n\n // Exit early if none of the symbols we're looking for are mentioned.\n if (\n !content ||\n (!content.includes('<' + TAG_NAME) &&\n !content.includes(MODULE_NAME) &&\n !content.includes(CLASS_NAME))\n ) {\n return;\n }\n\n const sourceFile = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);\n const toMigrate = findTypeScriptNodesToMigrate(sourceFile);\n\n if (toMigrate.length === 0) {\n return;\n }\n\n const printer = ts.createPrinter();\n const update = tree.beginUpdate(path);\n\n for (const node of toMigrate) {\n let replacement: ts.Node;\n\n if (ts.isStringLiteralLike(node)) {\n // Strings should be migrated as if they're HTML.\n if (ts.isStringLiteral(node)) {\n replacement = ts.factory.createStringLiteral(\n migrateHtml(node.text),\n node.getText()[0] === `'`,\n );\n } else {\n replacement = ts.factory.createNoSubstitutionTemplateLiteral(migrateHtml(node.text));\n }\n } else {\n // Imports/exports should preserve the old name, but import the clusterer using the new one.\n const propertyName = ts.factory.createIdentifier(DEPRECATED_CLASS_NAME);\n const name = node.name as ts.Identifier;\n\n replacement = ts.isImportSpecifier(node)\n ? ts.factory.updateImportSpecifier(node, node.isTypeOnly, propertyName, name)\n : ts.factory.updateExportSpecifier(node, node.isTypeOnly, propertyName, name);\n }\n\n update\n .remove(node.getStart(), node.getWidth())\n .insertLeft(\n node.getStart(),\n printer.printNode(ts.EmitHint.Unspecified, replacement, sourceFile),\n );\n }\n\n tree.commitUpdate(update);\n}\n\n/** Finds the TypeScript nodes that need to be migrated from a specific file. */\nfunction findTypeScriptNodesToMigrate(sourceFile: ts.SourceFile) {\n const results: (ts.StringLiteralLike | ts.ImportSpecifier | ts.ExportSpecifier)[] = [];\n\n sourceFile.forEachChild(function walk(node) {\n // Most likely a template using the clusterer.\n if (ts.isStringLiteral(node) && node.text.includes('<' + TAG_NAME)) {\n results.push(node);\n } else if (\n // Import/export referencing the clusterer.\n (ts.isImportDeclaration(node) || ts.isExportDeclaration(node)) &&\n node.moduleSpecifier &&\n ts.isStringLiteralLike(node.moduleSpecifier) &&\n node.moduleSpecifier.text === MODULE_NAME\n ) {\n const bindings = ts.isImportDeclaration(node)\n ? node.importClause?.namedBindings\n : node.exportClause;\n\n if (bindings && (ts.isNamedImports(bindings) || ts.isNamedExports(bindings))) {\n bindings.elements.forEach(element => {\n const symbolName = element.propertyName || element.name;\n\n if (ts.isIdentifier(symbolName) && symbolName.text === CLASS_NAME) {\n results.push(element);\n }\n });\n }\n } else {\n node.forEachChild(walk);\n }\n });\n\n // Sort the results in reverse order to make applying the updates easier.\n return results.sort((a, b) => b.getStart() - a.getStart());\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;AAUA,wBAAe;AAGf,IAAM,WAAW;AAGjB,IAAM,cAAc;AAGpB,IAAM,aAAa;AAGnB,IAAM,wBAAwB;AAGxB,SAAU,cAAW;AACzB,SAAO,UAAO;AACZ,SAAK,MAAM,UAAO;AA3BtB;AA4BM,UAAI,KAAK,SAAS,cAAc,GAAG;AACjC;MACF;AAEA,UAAI,KAAK,SAAS,OAAO,GAAG;AAC1B,cAAM,WAAU,UAAK,KAAK,IAAI,MAAd,mBAAiB;AAEjC,YAAI,WAAW,QAAQ,SAAS,MAAM,QAAQ,GAAG;AAC/C,eAAK,UAAU,MAAM,YAAY,OAAO,CAAC;QAC3C;MACF,WAAW,KAAK,SAAS,KAAK,KAAK,CAAC,KAAK,SAAS,OAAO,GAAG;AAC1D,0BAAkB,MAAM,IAAI;MAC9B;IACF,CAAC;EACH;AACF;AAGA,SAAS,YAAY,SAAe;AAClC,SAAO,QACJ,QAAQ,0BAA0B,kCAAkC,EACpE,QAAQ,4BAA4B,mCAAmC;AAC5E;AAGA,SAAS,kBAAkB,MAAY,MAAU;AArDjD;AAsDE,QAAM,WAAU,UAAK,KAAK,IAAI,MAAd,mBAAiB;AAGjC,MACE,CAAC,WACA,CAAC,QAAQ,SAAS,MAAM,QAAQ,KAC/B,CAAC,QAAQ,SAAS,WAAW,KAC7B,CAAC,QA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E,cAAQ,KAAK,IAAI;IACnB,YAEG,kBAAAA,QAAG,oBAAoB,IAAI,KAAK,kBAAAA,QAAG,oBAAoB,IAAI,MAC5D,KAAK,mBACL,kBAAAA,QAAG,oBAAoB,KAAK,eAAe,KAC3C,KAAK,gBAAgB,SAAS,aAC9B;AACA,YAAM,WAAW,kBAAAA,QAAG,oBAAoB,IAAI,KACxC,UAAK,iBAAL,mBAAmB,gBACnB,KAAK;AAET,UAAI,aAAa,kBAAAA,QAAG,eAAe,QAAQ,KAAK,kBAAAA,QAAG,eAAe,QAAQ,IAAI;AAC5E,iBAAS,SAAS,QAAQ,aAAU;AAClC,gBAAM,aAAa,QAAQ,gBAAgB,QAAQ;AAEnD,cAAI,kBAAAA,QAAG,aAAa,UAAU,KAAK,WAAW,SAAS,YAAY;AACjE,oBAAQ,KAAK,OAAO;UACtB;QACF,CAAC;MACH;IACF,OAAO;AACL,WAAK,aAAa,IAAI;IACxB;EACF,CAAC;AAGD,SAAO,QAAQ,KAAK,CAAC,GAAG,MAAM,EAAE,SAAQ,IAAK,EAAE,SAAQ,CAAE;AAC3D;",
6
- "names": ["ts"]
4
+ "sourcesContent": ["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Entry point for the migration schematics with target of Angular Material v20 */\nexport function updateToV20(): void {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;AASM,SAAU,cAAW;AAAU;",
6
+ "names": []
7
7
  }