From 6757d97b0ae789e0c61a776ad9af742858c663b0 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Sun, 28 Jul 2024 02:20:17 -0700 Subject: [PATCH] ci: update file icons (#2157) Co-authored-by: delucis <357379+delucis@users.noreply.github.com> Co-authored-by: Chris Swithinbank --- .changeset/sharp-onions-search.md | 5 +++++ .../user-components/file-tree-icons.ts | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .changeset/sharp-onions-search.md diff --git a/.changeset/sharp-onions-search.md b/.changeset/sharp-onions-search.md new file mode 100644 index 0000000000..a6d290af39 --- /dev/null +++ b/.changeset/sharp-onions-search.md @@ -0,0 +1,5 @@ +--- +"@astrojs/starlight": patch +--- + +Updates file tree icon mapping to correctly map `.cjs` and `.mjs` extensions in several contexts diff --git a/packages/starlight/user-components/file-tree-icons.ts b/packages/starlight/user-components/file-tree-icons.ts index d8c6af3808..2e9b58101f 100644 --- a/packages/starlight/user-components/file-tree-icons.ts +++ b/packages/starlight/user-components/file-tree-icons.ts @@ -44,6 +44,8 @@ export const definitions: Definitions = { COMMIT_EDITMSG: 'seti:git', MERGE_MSG: 'seti:git', 'karma.conf.js': 'seti:karma', + 'karma.conf.cjs': 'seti:karma', + 'karma.conf.mjs': 'seti:karma', 'karma.conf.coffee': 'seti:karma', 'README.md': 'seti:info', 'README.txt': 'seti:info', @@ -74,6 +76,7 @@ export const definitions: Definitions = { 'WORKSPACE.bazel': 'seti:bazel', 'bower.json': 'seti:bower', 'Bower.json': 'seti:bower', + 'eslint.config.js': 'seti:eslint', 'firebase.json': 'seti:firebase', geckodriver: 'seti:firefox', 'Gruntfile.js': 'seti:grunt', @@ -91,22 +94,28 @@ export const definitions: Definitions = { 'sass-lint.yml': 'seti:sass', 'stylelint.config.js': 'seti:stylelint', 'stylelint.config.cjs': 'seti:stylelint', + 'stylelint.config.mjs': 'seti:stylelint', 'yarn.clean': 'seti:yarn', 'yarn.lock': 'seti:yarn', 'webpack.config.js': 'seti:webpack', 'webpack.config.cjs': 'seti:webpack', + 'webpack.config.mjs': 'seti:webpack', 'webpack.config.ts': 'seti:webpack', 'webpack.config.build.js': 'seti:webpack', 'webpack.config.build.cjs': 'seti:webpack', + 'webpack.config.build.mjs': 'seti:webpack', 'webpack.config.build.ts': 'seti:webpack', 'webpack.common.js': 'seti:webpack', 'webpack.common.cjs': 'seti:webpack', + 'webpack.common.mjs': 'seti:webpack', 'webpack.common.ts': 'seti:webpack', 'webpack.dev.js': 'seti:webpack', 'webpack.dev.cjs': 'seti:webpack', + 'webpack.dev.mjs': 'seti:webpack', 'webpack.dev.ts': 'seti:webpack', 'webpack.prod.js': 'seti:webpack', 'webpack.prod.cjs': 'seti:webpack', + 'webpack.prod.mjs': 'seti:webpack', 'webpack.prod.ts': 'seti:webpack', 'npm-debug.log': 'seti:npm_ignored', }, @@ -218,8 +227,16 @@ export const definitions: Definitions = { '.properties': 'seti:java', '.js': 'seti:javascript', '.js.map': 'seti:javascript', + '.cjs': 'seti:javascript', + '.cjs.map': 'seti:javascript', + '.mjs': 'seti:javascript', + '.mjs.map': 'seti:javascript', '.spec.js': 'seti:javascript', + '.spec.cjs': 'seti:javascript', + '.spec.mjs': 'seti:javascript', '.test.js': 'seti:javascript', + '.test.cjs': 'seti:javascript', + '.test.mjs': 'seti:javascript', '.es': 'seti:javascript', '.es5': 'seti:javascript', '.es6': 'seti:javascript',