From ceda8bc25e82b1dbdeadd451f74b05d04fdc9509 Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Thu, 3 Oct 2024 16:10:36 +0800 Subject: [PATCH] remove ember-leaflet patch and use exclude options --- config/environment.js | 8 ++- package.json | 5 +- patches/ember-leaflet@5.1.3.patch | 95 ------------------------------- pnpm-lock.yaml | 7 +-- 4 files changed, 11 insertions(+), 104 deletions(-) delete mode 100644 patches/ember-leaflet@5.1.3.patch diff --git a/config/environment.js b/config/environment.js index 8d3218c..8c26dbc 100644 --- a/config/environment.js +++ b/config/environment.js @@ -1,5 +1,11 @@ 'use strict'; module.exports = function (/* environment, appConfig */) { - return {}; + return { + 'ember-leaflet': { + excludeCSS: true, + excludeJS: true, + excludeImages: true, + }, + }; }; diff --git a/package.json b/package.json index f754ac7..a9ba17d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fleetbase/ember-ui", - "version": "0.2.32", + "version": "0.2.33", "description": "Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.", "keywords": [ "fleetbase-ui", @@ -188,8 +188,7 @@ }, "pnpm": { "patchedDependencies": { - "ember-gridstack@4.0.0": "patches/ember-gridstack@4.0.0.patch", - "ember-leaflet@5.1.3": "patches/ember-leaflet@5.1.3.patch" + "ember-gridstack@4.0.0": "patches/ember-gridstack@4.0.0.patch" } } } diff --git a/patches/ember-leaflet@5.1.3.patch b/patches/ember-leaflet@5.1.3.patch deleted file mode 100644 index 3ddfe29..0000000 --- a/patches/ember-leaflet@5.1.3.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff --git a/index.js b/index.js -index 7361871adfe0b79c70a3699e38cc435f3741cb33..e02f7e6d61605d8b770ed5c0454b6c905d538ff9 100644 ---- a/index.js -+++ b/index.js -@@ -1,87 +1,5 @@ --'use strict'; --const resolve = require('resolve'); --const path = require('path'); --const mergeTrees = require('broccoli-merge-trees'); --const Funnel = require('broccoli-funnel'); --const fastbootTransform = require('fastboot-transform'); -+'use strict' - - module.exports = { -- name: require('./package').name, -- -- treeForVendor() { -- let dist = path.join(this.pathBase('leaflet'), 'dist'); -- -- let leafletJs = fastbootTransform( -- new Funnel(dist, { -- files: ['leaflet-src.js'], -- destDir: 'leaflet' -- }) -- ); -- -- let leafletFiles = new Funnel(dist, { -- exclude: ['leaflet.js', 'leaflet-src.js', '*.html'], -- destDir: 'leaflet' -- }); -- -- return mergeTrees([leafletJs, leafletFiles]); -- }, -- -- included(app) { -- this._super.included.apply(this, arguments); -- -- // Addon options from the apps ember-cli-build.js -- let options = app.options[this.name] || {}; -- -- // If the addon has the _findHost() method (in ember-cli >= 2.7.0), we'll just -- // use that. -- // if (typeof this._findHost === 'function') { -- // app = this._findHost(); -- // } -- -- // Otherwise, we'll use this implementation borrowed from the _findHost() -- // method in ember-cli. -- // Keep iterating upward until we don't have a grandparent. -- // Has to do this grandparent check because at some point we hit the project. -- let current = this; -- do { -- if (current.lazyLoading === true || (current.lazyLoading && current.lazyLoading.enabled === true)) { -- app = current; -- break; -- } -- app = current.app || app; -- } while (current.parent.parent && (current = current.parent)); -- -- if (!options.excludeJS) { -- app.import('vendor/leaflet/leaflet-src.js'); -- } -- -- // Import leaflet css -- if (!options.excludeCSS) { -- app.import('vendor/leaflet/leaflet.css'); -- } -- -- // Import leaflet images -- if (!options.excludeImages) { -- let imagesDestDir = '/assets/images'; -- app.import('vendor/leaflet/images/layers-2x.png', { -- destDir: imagesDestDir -- }); -- app.import('vendor/leaflet/images/layers.png', { -- destDir: imagesDestDir -- }); -- app.import('vendor/leaflet/images/marker-icon-2x.png', { -- destDir: imagesDestDir -- }); -- app.import('vendor/leaflet/images/marker-icon.png', { -- destDir: imagesDestDir -- }); -- app.import('vendor/leaflet/images/marker-shadow.png', { -- destDir: imagesDestDir -- }); -- } -- }, -- -- pathBase(packageName) { -- return path.dirname(resolve.sync(packageName + '/package.json', { basedir: __dirname })); -- } --}; -+ name: require('./package').name -+} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 48eab04..07befff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ patchedDependencies: ember-gridstack@4.0.0: hash: fwahdwiexnnbxgjkolq2q4epju path: patches/ember-gridstack@4.0.0.patch - ember-leaflet@5.1.3: - hash: 2hdi7ajimhpivctwjmqkqnthem - path: patches/ember-leaflet@5.1.3.patch importers: @@ -189,7 +186,7 @@ importers: version: 4.0.3(ember-source@5.4.1(@babel/core@7.25.2)(@glimmer/component@1.1.2(@babel/core@7.25.2))(rsvp@4.8.5)(webpack@5.95.0)) ember-leaflet: specifier: ^5.1.3 - version: 5.1.3(patch_hash=2hdi7ajimhpivctwjmqkqnthem)(@babel/core@7.25.2)(ember-source@5.4.1(@babel/core@7.25.2)(@glimmer/component@1.1.2(@babel/core@7.25.2))(rsvp@4.8.5)(webpack@5.95.0))(leaflet@1.9.4)(webpack@5.95.0) + version: 5.1.3(@babel/core@7.25.2)(ember-source@5.4.1(@babel/core@7.25.2)(@glimmer/component@1.1.2(@babel/core@7.25.2))(rsvp@4.8.5)(webpack@5.95.0))(leaflet@1.9.4)(webpack@5.95.0) ember-loading: specifier: ^2.0.0 version: 2.0.0(@babel/core@7.25.2) @@ -12860,7 +12857,7 @@ snapshots: transitivePeerDependencies: - supports-color - ember-leaflet@5.1.3(patch_hash=2hdi7ajimhpivctwjmqkqnthem)(@babel/core@7.25.2)(ember-source@5.4.1(@babel/core@7.25.2)(@glimmer/component@1.1.2(@babel/core@7.25.2))(rsvp@4.8.5)(webpack@5.95.0))(leaflet@1.9.4)(webpack@5.95.0): + ember-leaflet@5.1.3(@babel/core@7.25.2)(ember-source@5.4.1(@babel/core@7.25.2)(@glimmer/component@1.1.2(@babel/core@7.25.2))(rsvp@4.8.5)(webpack@5.95.0))(leaflet@1.9.4)(webpack@5.95.0): dependencies: '@glimmer/component': 1.1.2(@babel/core@7.25.2) '@glimmer/tracking': 1.1.2