diff --git a/app/assets/stylesheets/pdf.css.scss b/app/assets/stylesheets/pdf.css.scss index 6048c8a3e51..a72daa57989 100644 --- a/app/assets/stylesheets/pdf.css.scss +++ b/app/assets/stylesheets/pdf.css.scss @@ -8,6 +8,8 @@ a { // We need the import here, otherwise Rails' asset adds a BOM at the beginning of it, // and the font doesn't get recognize! +// This refers to: `[repo root]/node_modules/@cubing/icons/dist/lib/@cubing/icons/cubing-icons.css`, +// per a configuration in `assets.rb`. @import "cubing-icons"; /* stylelint-disable-line no-invalid-position-at-import-rule */ header { diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 10499a8f0c4..c84547c9748 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -10,7 +10,12 @@ # helper! # wicked_pdf's helpers can't handle "packs_with_chunks" and therefore cannot # properly inline our packs :( -Rails.application.config.assets.paths << Rails.root.join("node_modules", "@cubing", "icons", "www", "css") +# Note: reaching into the package structure violates the semantics of package +# exports, which could theoretically turn any release of `@cubing/icons` into a +# breaking one. However, this path should be fairly stable, and the usage here +# should be safe as long as `@cubing/icons` is not bumped automatically without +# exercising this code path in a test. +Rails.application.config.assets.paths << Rails.root.join("node_modules", "@cubing", "icons", "dist", "lib", "@cubing", "icons") # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. diff --git a/package.json b/package.json index 044d953a14a..c9e4e2d1da2 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@babel/preset-env": "^7.26.0", "@babel/preset-react": "^7.26.3", "@babel/runtime": "^7.26.0", - "@cubing/icons": "^1.1.3", + "@cubing/icons": "^3.0.0", "@fullcalendar/core": "^6.1.15", "@fullcalendar/interaction": "^6.1.15", "@fullcalendar/luxon3": "^6.1.15", diff --git a/yarn.lock b/yarn.lock index d0d00ccd4d9..52e143e7670 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1898,10 +1898,10 @@ __metadata: languageName: node linkType: hard -"@cubing/icons@npm:^1.1.3": - version: 1.1.3 - resolution: "@cubing/icons@npm:1.1.3" - checksum: 10c0/332fb3a4888020c39031201e9045569a190e9b40852c1857cdc44e624a9bf09d4fafc72691c8596ba7c59411ffc9dd79bb6686f48608f7438807ed099a22c805 +"@cubing/icons@npm:^3.0.0": + version: 3.0.0 + resolution: "@cubing/icons@npm:3.0.0" + checksum: 10c0/7ac6721ba9a8b206ea8171697d1485b4c36f8ad3c4564f852f42cfd7de6ed102d35af0982ad8c6b9b3b16b46d1ee770274375a5ed4ae976cd1fd361198f1896b languageName: node linkType: hard @@ -10159,7 +10159,7 @@ __metadata: "@babel/preset-env": "npm:^7.26.0" "@babel/preset-react": "npm:^7.26.3" "@babel/runtime": "npm:^7.26.0" - "@cubing/icons": "npm:^1.1.3" + "@cubing/icons": "npm:^3.0.0" "@fullcalendar/core": "npm:^6.1.15" "@fullcalendar/interaction": "npm:^6.1.15" "@fullcalendar/luxon3": "npm:^6.1.15"