Skip to content

Remove Vue and simplify & update NPM modules#887

Merged
TimidRobot merged 3 commits intovocab-refreshfrom
remove-vue-sass
Jan 10, 2025
Merged

Remove Vue and simplify & update NPM modules#887
TimidRobot merged 3 commits intovocab-refreshfrom
remove-vue-sass

Conversation

@TimidRobot
Copy link
Copy Markdown
Member

@TimidRobot TimidRobot commented Jan 10, 2025

Fixes

Description

Remove Vue and simplify & update NPM modules:

  • Move ideas.js out of webpack
    • Only load ideas.js from project-ideas page
  • Update jQuery to latest
    • Only load jQuery from project-ideas page
  • Reconfigure webpack around issue-finder.js
    • Only load issue-finder.js from issue-finder page
  • Remove legacy JavaScript
  • Remove all Sass
  • Remove unused NPM modules and update to latest versions

Style localizations removed

All of the files in the webpack/sass/ directory (permalink) are removed by this pull request (PR). They may be helpful references as the site is restyled as part of the Vocabulary refresh.

Technical details

--- npmlist.old	2025-01-10 06:41:10
+++ npmlist.new	2025-01-10 07:43:12
@@ -1,64 +1,4 @@
 webpack@ /Users/timidrobot/git/creativecommons/creativecommons.github.io-source/webpack
-├─┬ @babel/core@7.26.0
-│ ├─┬ @ampproject/remapping@2.3.0
-│ │ ├─┬ @jridgewell/gen-mapping@0.3.8
-│ │ │ ├── @jridgewell/set-array@1.2.1
-│ │ │ ├── @jridgewell/sourcemap-codec@1.5.0
-│ │ │ └── @jridgewell/trace-mapping@0.3.25 deduped
-│ │ └─┬ @jridgewell/trace-mapping@0.3.25
-│ │   ├── @jridgewell/resolve-uri@3.1.2
-│ │   └── @jridgewell/sourcemap-codec@1.5.0 deduped
-│ ├─┬ @babel/code-frame@7.26.2
-│ │ ├── @babel/helper-validator-identifier@7.25.9
-│ │ ├── js-tokens@4.0.0
-│ │ └── picocolors@1.1.1 deduped
-│ ├─┬ @babel/generator@7.26.3
-│ │ ├── @babel/parser@7.26.3 deduped
-│ │ ├── @babel/types@7.26.3 deduped
-│ │ ├── @jridgewell/gen-mapping@0.3.8 deduped
-│ │ ├── @jridgewell/trace-mapping@0.3.25 deduped
-│ │ └── jsesc@3.1.0
-│ ├─┬ @babel/helper-compilation-targets@7.25.9
-│ │ ├── @babel/compat-data@7.26.3
-│ │ ├── @babel/helper-validator-option@7.25.9
-│ │ ├── browserslist@4.24.4 deduped
-│ │ ├─┬ lru-cache@5.1.1
-│ │ │ └── yallist@3.1.1
-│ │ └── semver@6.3.1 deduped
-│ ├─┬ @babel/helper-module-transforms@7.26.0
-│ │ ├── @babel/core@7.26.0 deduped
-│ │ ├─┬ @babel/helper-module-imports@7.25.9
-│ │ │ ├── @babel/traverse@7.26.4 deduped
-│ │ │ └── @babel/types@7.26.3 deduped
-│ │ ├── @babel/helper-validator-identifier@7.25.9 deduped
-│ │ └── @babel/traverse@7.26.4 deduped
-│ ├─┬ @babel/helpers@7.26.0
-│ │ ├── @babel/template@7.25.9 deduped
-│ │ └── @babel/types@7.26.3 deduped
-│ ├─┬ @babel/parser@7.26.3
-│ │ └── @babel/types@7.26.3 deduped
-│ ├─┬ @babel/template@7.25.9
-│ │ ├── @babel/code-frame@7.26.2 deduped
-│ │ ├── @babel/parser@7.26.3 deduped
-│ │ └── @babel/types@7.26.3 deduped
-│ ├─┬ @babel/traverse@7.26.4
-│ │ ├── @babel/code-frame@7.26.2 deduped
-│ │ ├── @babel/generator@7.26.3 deduped
-│ │ ├── @babel/parser@7.26.3 deduped
-│ │ ├── @babel/template@7.25.9 deduped
-│ │ ├── @babel/types@7.26.3 deduped
-│ │ ├── debug@4.4.0 deduped
-│ │ └── globals@11.12.0
-│ ├─┬ @babel/types@7.26.3
-│ │ ├── @babel/helper-string-parser@7.25.9
-│ │ └── @babel/helper-validator-identifier@7.25.9 deduped
-│ ├── convert-source-map@2.0.0
-│ ├─┬ debug@4.4.0
-│ │ └── ms@2.1.3
-│ ├── gensync@1.0.0-beta.2
-│ ├── json5@2.2.3
-│ └── semver@6.3.1
-├── @creativecommons/vocabulary@2020.11.1
 ├─┬ @octokit/rest@18.12.0
 │ ├─┬ @octokit/core@3.6.0
 │ │ ├─┬ @octokit/auth-token@2.5.0
@@ -99,163 +39,55 @@
 │   ├── @octokit/core@3.6.0 deduped
 │   ├── @octokit/types@6.41.0 deduped
 │   └── deprecation@2.3.1
-├─┬ autoprefixer@10.4.20
-│ ├─┬ browserslist@4.24.4
-│ │ ├── caniuse-lite@1.0.30001690 deduped
-│ │ ├── electron-to-chromium@1.5.79
-│ │ ├── node-releases@2.0.19
-│ │ └─┬ update-browserslist-db@1.1.2
-│ │   ├── browserslist@4.24.4 deduped
-│ │   ├── escalade@3.2.0
-│ │   └── picocolors@1.1.1 deduped
-│ ├── caniuse-lite@1.0.30001690
-│ ├── fraction.js@4.3.7
-│ ├── normalize-range@0.1.2
-│ ├── picocolors@1.1.1
-│ ├── postcss-value-parser@4.2.0
-│ └─┬ postcss@8.4.49
-│   ├── nanoid@3.3.8
-│   ├── picocolors@1.1.1 deduped
-│   └── source-map-js@1.2.1 deduped
-├─┬ babel-loader@8.4.1
-│ ├── @babel/core@7.26.0 deduped
-│ ├─┬ find-cache-dir@3.3.2
-│ │ ├── commondir@1.0.1
-│ │ ├── make-dir@3.1.0 deduped
-│ │ └─┬ pkg-dir@4.2.0
-│ │   └─┬ find-up@4.1.0
-│ │     ├─┬ locate-path@5.0.0
-│ │     │ └─┬ p-locate@4.1.0
-│ │     │   └─┬ p-limit@2.3.0
-│ │     │     └── p-try@2.2.0
-│ │     └── path-exists@4.0.0
-│ ├─┬ loader-utils@2.0.4
-│ │ ├── big.js@5.2.2
-│ │ ├── emojis-list@3.0.0
-│ │ └── json5@2.2.3 deduped
-│ ├─┬ make-dir@3.1.0
-│ │ └── semver@6.3.1 deduped
-│ ├─┬ schema-utils@2.7.1
-│ │ ├── @types/json-schema@7.0.15
-│ │ ├─┬ ajv-keywords@3.5.2
-│ │ │ └── ajv@6.12.6 deduped
-│ │ └─┬ ajv@6.12.6
-│ │   ├── fast-deep-equal@3.1.3
-│ │   ├── fast-json-stable-stringify@2.1.0
-│ │   ├── json-schema-traverse@0.4.1
-│ │   └─┬ uri-js@4.4.1
-│ │     └── punycode@2.3.1
-│ └── webpack@5.97.1 deduped
-├─┬ buffer@6.0.3
-│ ├── base64-js@1.5.1
-│ └── ieee754@1.2.1
-├── bulma@0.9.4
-├─┬ file-loader@6.2.0
-│ ├── loader-utils@2.0.4 deduped
-│ ├─┬ schema-utils@3.3.0
-│ │ ├── @types/json-schema@7.0.15 deduped
-│ │ ├── ajv-keywords@3.5.2 deduped
-│ │ └── ajv@6.12.6 deduped
-│ └── webpack@5.97.1 deduped
 ├─┬ js-yaml@3.14.1
 │ ├─┬ argparse@1.0.10
 │ │ └── sprintf-js@1.0.3
 │ └── esprima@4.0.1
-├─┬ sass-loader@12.6.0
-│ ├── UNMET OPTIONAL DEPENDENCY fibers@>= 3.1.0
-│ ├── klona@2.0.6
-│ ├── neo-async@2.6.2
-│ ├── UNMET OPTIONAL DEPENDENCY node-sass@^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0
-│ ├── UNMET OPTIONAL DEPENDENCY sass-embedded@*
-│ ├── sass@1.83.1 deduped
+├─┬ source-map-loader@5.0.0
+│ ├─┬ iconv-lite@0.6.3
+│ │ └── safer-buffer@2.1.2
+│ ├── source-map-js@1.2.1
 │ └── webpack@5.97.1 deduped
-├─┬ sass@1.83.1
-│ ├─┬ @parcel/watcher@2.5.0
-│ │ ├── @parcel/watcher-android-arm64@2.5.0
-│ │ ├── @parcel/watcher-darwin-arm64@2.5.0
-│ │ ├── @parcel/watcher-darwin-x64@2.5.0
-│ │ ├── @parcel/watcher-freebsd-x64@2.5.0
-│ │ ├── @parcel/watcher-linux-arm-glibc@2.5.0
-│ │ ├── @parcel/watcher-linux-arm-musl@2.5.0
-│ │ ├── @parcel/watcher-linux-arm64-glibc@2.5.0
-│ │ ├── @parcel/watcher-linux-arm64-musl@2.5.0
-│ │ ├── @parcel/watcher-linux-x64-glibc@2.5.0
-│ │ ├── @parcel/watcher-linux-x64-musl@2.5.0
-│ │ ├── @parcel/watcher-win32-arm64@2.5.0
-│ │ ├── @parcel/watcher-win32-ia32@2.5.0
-│ │ ├── @parcel/watcher-win32-x64@2.5.0
-│ │ ├── detect-libc@1.0.3
-│ │ ├─┬ is-glob@4.0.3
-│ │ │ └── is-extglob@2.1.1
-│ │ ├─┬ micromatch@4.0.8
-│ │ │ ├─┬ braces@3.0.3
-│ │ │ │ └─┬ fill-range@7.1.1
-│ │ │ │   └─┬ to-regex-range@5.0.1
-│ │ │ │     └── is-number@7.0.0
-│ │ │ └── picomatch@2.3.1
-│ │ └── node-addon-api@7.1.1
-│ ├─┬ chokidar@4.0.3
-│ │ └── readdirp@4.0.2
-│ ├── immutable@5.0.3
-│ └── source-map-js@1.2.1
-├─┬ style-loader@2.0.0
-│ ├── loader-utils@2.0.4 deduped
-│ ├─┬ schema-utils@3.3.0
-│ │ ├── @types/json-schema@7.0.15 deduped
-│ │ ├── ajv-keywords@3.5.2 deduped
-│ │ └── ajv@6.12.6 deduped
-│ └── webpack@5.97.1 deduped
-├─┬ url-loader@4.1.1
-│ ├── file-loader@6.2.0 deduped
-│ ├── loader-utils@2.0.4 deduped
-│ ├─┬ mime-types@2.1.35
-│ │ └── mime-db@1.52.0
-│ ├─┬ schema-utils@3.3.0
-│ │ ├── @types/json-schema@7.0.15 deduped
-│ │ ├── ajv-keywords@3.5.2 deduped
-│ │ └── ajv@6.12.6 deduped
-│ └── webpack@5.97.1 deduped
-├─┬ vue-select@3.20.3
-│ └── vue@2.7.16 deduped
-├─┬ vue@2.7.16
-│ ├─┬ @vue/compiler-sfc@2.7.16
-│ │ ├── @babel/parser@7.26.3 deduped
-│ │ ├── postcss@8.4.49 deduped
-│ │ ├── prettier@2.8.8
-│ │ └── source-map@0.6.1
-│ └── csstype@3.1.3
-├─┬ webpack-cli@4.10.0
-│ ├── @discoveryjs/json-ext@0.5.7
-│ ├─┬ @webpack-cli/configtest@1.2.0
-│ │ ├── webpack-cli@4.10.0 deduped
+├─┬ webpack-cli@6.0.1
+│ ├── @discoveryjs/json-ext@0.6.3
+│ ├─┬ @webpack-cli/configtest@3.0.1
+│ │ ├── webpack-cli@6.0.1 deduped
 │ │ └── webpack@5.97.1 deduped
-│ ├─┬ @webpack-cli/info@1.5.0
-│ │ ├── envinfo@7.14.0
-│ │ └── webpack-cli@4.10.0 deduped
-│ ├─┬ @webpack-cli/serve@1.7.0
-│ │ └── webpack-cli@4.10.0 deduped
+│ ├─┬ @webpack-cli/info@3.0.1
+│ │ ├── webpack-cli@6.0.1 deduped
+│ │ └── webpack@5.97.1 deduped
+│ ├─┬ @webpack-cli/serve@3.0.1
+│ │ ├── webpack-cli@6.0.1 deduped
+│ │ └── webpack@5.97.1 deduped
 │ ├── colorette@2.0.20
-│ ├── commander@7.2.0
+│ ├── commander@12.1.0
 │ ├─┬ cross-spawn@7.0.6
 │ │ ├── path-key@3.1.1
 │ │ ├─┬ shebang-command@2.0.0
 │ │ │ └── shebang-regex@3.0.0
 │ │ └─┬ which@2.0.2
 │ │   └── isexe@2.0.0
+│ ├── envinfo@7.14.0
 │ ├── fastest-levenshtein@1.0.16
 │ ├─┬ import-local@3.2.0
-│ │ ├── pkg-dir@4.2.0 deduped
+│ │ ├─┬ pkg-dir@4.2.0
+│ │ │ └─┬ find-up@4.1.0
+│ │ │   ├─┬ locate-path@5.0.0
+│ │ │   │ └─┬ p-locate@4.1.0
+│ │ │   │   └─┬ p-limit@2.3.0
+│ │ │   │     └── p-try@2.2.0
+│ │ │   └── path-exists@4.0.0
 │ │ └─┬ resolve-cwd@3.0.0
 │ │   └── resolve-from@5.0.0
-│ ├── interpret@2.2.0
-│ ├─┬ rechoir@0.7.1
+│ ├── interpret@3.1.1
+│ ├─┬ rechoir@0.8.0
 │ │ └─┬ resolve@1.22.10
 │ │   ├─┬ is-core-module@2.16.1
 │ │   │ └─┬ hasown@2.0.2
 │ │   │   └── function-bind@1.1.2
 │ │   ├── path-parse@1.0.7
 │ │   └── supports-preserve-symlinks-flag@1.0.0
-│ ├─┬ webpack-merge@5.10.0
+│ ├─┬ webpack-merge@6.0.1
 │ │ ├─┬ clone-deep@4.0.1
 │ │ │ ├─┬ is-plain-object@2.0.4
 │ │ │ │ └── isobject@3.0.1
@@ -312,7 +144,14 @@
   │ │ └── @xtuc/long@4.2.2 deduped
   │ └── @webassemblyjs/utf8@1.13.2
   ├── acorn@8.14.0
-  ├── browserslist@4.24.4 deduped
+  ├─┬ browserslist@4.24.4
+  │ ├── caniuse-lite@1.0.30001692
+  │ ├── electron-to-chromium@1.5.80
+  │ ├── node-releases@2.0.19
+  │ └─┬ update-browserslist-db@1.1.2
+  │   ├── browserslist@4.24.4 deduped
+  │   ├── escalade@3.2.0
+  │   └── picocolors@1.1.1
   ├── chrome-trace-event@1.0.4
   ├─┬ enhanced-resolve@5.18.0
   │ ├── graceful-fs@4.2.11 deduped
@@ -327,15 +166,24 @@
   ├── graceful-fs@4.2.11
   ├── json-parse-even-better-errors@2.3.1
   ├── loader-runner@4.3.0
-  ├── mime-types@2.1.35 deduped
-  ├── neo-async@2.6.2 deduped
+  ├─┬ mime-types@2.1.35
+  │ └── mime-db@1.52.0
+  ├── neo-async@2.6.2
   ├─┬ schema-utils@3.3.0
-  │ ├── @types/json-schema@7.0.15 deduped
-  │ ├── ajv-keywords@3.5.2 deduped
-  │ └── ajv@6.12.6 deduped
+  │ ├── @types/json-schema@7.0.15
+  │ ├─┬ ajv-keywords@3.5.2
+  │ │ └── ajv@6.12.6 deduped
+  │ └─┬ ajv@6.12.6
+  │   ├── fast-deep-equal@3.1.3
+  │   ├── fast-json-stable-stringify@2.1.0
+  │   ├── json-schema-traverse@0.4.1
+  │   └─┬ uri-js@4.4.1
+  │     └── punycode@2.3.1
   ├── tapable@2.2.1
   ├─┬ terser-webpack-plugin@5.3.11
-  │ ├── @jridgewell/trace-mapping@0.3.25 deduped
+  │ ├─┬ @jridgewell/trace-mapping@0.3.25
+  │ │ ├── @jridgewell/resolve-uri@3.1.2
+  │ │ └── @jridgewell/sourcemap-codec@1.5.0
   │ ├─┬ jest-worker@27.5.1
   │ │ ├─┬ @types/node@22.10.5
   │ │ │ └── undici-types@6.20.0
@@ -363,13 +211,16 @@
   │ │   └── safe-buffer@5.2.1
   │ ├─┬ terser@5.37.0
   │ │ ├─┬ @jridgewell/source-map@0.3.6
-  │ │ │ ├── @jridgewell/gen-mapping@0.3.8 deduped
+  │ │ │ ├─┬ @jridgewell/gen-mapping@0.3.8
+  │ │ │ │ ├── @jridgewell/set-array@1.2.1
+  │ │ │ │ ├── @jridgewell/sourcemap-codec@1.5.0 deduped
+  │ │ │ │ └── @jridgewell/trace-mapping@0.3.25 deduped
   │ │ │ └── @jridgewell/trace-mapping@0.3.25 deduped
   │ │ ├── acorn@8.14.0 deduped
   │ │ ├── commander@2.20.3
   │ │ └─┬ source-map-support@0.5.21
   │ │   ├── buffer-from@1.1.2
-  │ │   └── source-map@0.6.1 deduped
+  │ │   └── source-map@0.6.1
   │ └── webpack@5.97.1 deduped
   ├─┬ watchpack@2.4.2
   │ ├── glob-to-regexp@0.4.1 deduped

webpack v5 & buffer

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:

  • add a fallback
    resolve.fallback: { "buffer": require.resolve("buffer/") }
  • install 'buffer'

If you don't want to include a polyfill, you can use an empty module like this:

resolve.fallback: { "buffer": false }

Tests

  • No build errors
  • No browser console errors on Issue Finder page
  • No browser console errors on Project Ideas page

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the default branch of the repository (main or master).
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no
    visible errors.

Developer Certificate of Origin

For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

- Move ideas.js out of webpack
  - Only load ideas.js from project-ideas page
- Update jQuery to latest
  - Only load jQuery from project-ideas page
- Reconfigure webpack around issue-finder.js
  - Only load issue-finder.js from issue-finder page
- Remove legacy JavaScript
- Remove all Sass
- Remove unused NPM modules and update to latest versions
@TimidRobot TimidRobot self-assigned this Jan 10, 2025
@TimidRobot TimidRobot requested review from a team as code owners January 10, 2025 15:49
@TimidRobot TimidRobot requested review from Dhruvi16 and removed request for a team January 10, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Feature] Remove vue and clean-up javaScript in CC Open Source

2 participants