Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85628076
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/build/check-versions.mjs b/build/check-versions.mjs
deleted file mode 100644
index c22004b00b..0000000000
--- a/build/check-versions.mjs
+++ /dev/null
@@ -1,41 +0,0 @@
-import chalk from 'chalk'
-import semver from 'semver'
-
-import packageConfig from '../package.json' with { type: 'json' }
-
-var versionRequirements = [
- {
- name: 'node',
- currentVersion: semver.clean(process.version),
- versionRequirement: packageConfig.engines.node,
- },
-]
-
-export default function () {
- const warnings = []
- for (let i = 0; i < versionRequirements.length; i++) {
- const mod = versionRequirements[i]
- if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
- warnings.push(
- mod.name +
- ': ' +
- chalk.red(mod.currentVersion) +
- ' should be ' +
- chalk.green(mod.versionRequirement),
- )
- }
- }
-
- if (warnings.length) {
- console.warn(
- chalk.yellow(
- '\nTo use this template, you must update following to modules:\n',
- ),
- )
- for (let i = 0; i < warnings.length; i++) {
- const warning = warnings[i]
- console.warn(' ' + warning)
- }
- process.exit(1)
- }
-}
diff --git a/build/commit_hash.js b/build/commit_hash.js
index c603558044..480672fa30 100644
--- a/build/commit_hash.js
+++ b/build/commit_hash.js
@@ -1,18 +1,18 @@
-import childProcess from 'child_process'
+import childProcess from 'node:child_process'
export const getCommitHash = () => {
const subst = '$Format:%h$'
if (!subst.match(/Format:/)) {
return subst
} else {
try {
return childProcess
.execSync('git rev-parse --short HEAD')
.toString()
.trim()
} catch (e) {
console.error('Failed run git:', e)
return 'UNKNOWN'
}
}
}
diff --git a/build/update-emoji.js b/build/update-emoji.js
index 4ff7e1de80..562caa3f07 100644
--- a/build/update-emoji.js
+++ b/build/update-emoji.js
@@ -1,22 +1,22 @@
import emojis from '@kazvmoe-infra/unicode-emoji-json/data-by-group.json' with {
type: 'json',
}
-import fs from 'fs'
+import fs from 'node:fs'
Object.keys(emojis).map((k) => {
- emojis[k].map((e) => {
+ emojis[k].forEach((e) => {
delete e.unicode_version
delete e.emoji_version
delete e.skin_tone_support_unicode_version
})
})
const res = {}
-Object.keys(emojis).map((k) => {
- const groupId = k.replace('&', 'and').replace(/ /g, '-').toLowerCase()
+Object.keys(emojis).forEach((k) => {
+ const groupId = k.replace('&', 'and').replaceAll(/ /, '-').toLowerCase()
res[groupId] = emojis[k]
})
console.info('Updating emojis...')
fs.writeFileSync('src/assets/emoji.json', JSON.stringify(res))
console.info('Done.')
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Aug 8, 9:33 AM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1723059
Default Alt Text
(2 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline
Log In to Comment