Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
31609da2
Commit
31609da2
authored
1 month ago
by
HJ
Browse files
Options
Downloads
Patches
Plain Diff
move to mjs
parent
af572984
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2025
Update dependency chalk to v5
Pipeline
#51642
passed
1 month ago
Stage: lint
Stage: build
Stage: test
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build/build.js
+1
-1
1 addition, 1 deletion
build/build.js
build/check-versions.mjs
+10
-13
10 additions, 13 deletions
build/check-versions.mjs
build/dev-server.js
+1
-1
1 addition, 1 deletion
build/dev-server.js
with
12 additions
and
15 deletions
build/build.js
+
1
−
1
View file @
31609da2
// https://github.com/shelljs/shelljs
require
(
'
./check-versions
'
)(
)
import
(
'
./check-versions
.mjs
'
).
then
(
m
=>
m
.
default
()
)
require
(
'
shelljs/global
'
)
env
.
NODE_ENV
=
'
production
'
...
...
This diff is collapsed.
Click to expand it.
build/check-versions.js
→
build/check-versions.
m
js
+
10
−
13
View file @
31609da2
var
semver
=
require
(
'
semver
'
)
var
chalk
=
require
(
'
chalk
'
)
var
packageConfig
=
require
(
'
../package.json
'
)
var
exec
=
function
(
cmd
)
{
return
require
(
'
child_process
'
)
.
execSync
(
cmd
).
toString
().
trim
()
}
import
semver
from
'
semver
'
import
chalk
from
'
chalk
'
import
packageConfig
from
'
../package.json
'
with
{
type
:
'
json
'
}
var
versionRequirements
=
[
{
...
...
@@ -14,10 +11,10 @@ var versionRequirements = [
}
]
module
.
exports
=
function
()
{
var
warnings
=
[]
for
(
var
i
=
0
;
i
<
versionRequirements
.
length
;
i
++
)
{
var
mod
=
versionRequirements
[
i
]
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
'
+
...
...
@@ -28,8 +25,8 @@ module.exports = function () {
if
(
warnings
.
length
)
{
console
.
warn
(
chalk
.
yellow
(
'
\n
To use this template, you must update following to modules:
\n
'
))
for
(
var
i
=
0
;
i
<
warnings
.
length
;
i
++
)
{
var
warning
=
warnings
[
i
]
for
(
let
i
=
0
;
i
<
warnings
.
length
;
i
++
)
{
const
warning
=
warnings
[
i
]
console
.
warn
(
'
'
+
warning
)
}
console
.
warn
()
...
...
This diff is collapsed.
Click to expand it.
build/dev-server.js
+
1
−
1
View file @
31609da2
require
(
'
./check-versions
'
)(
)
import
(
'
./check-versions
.mjs
'
).
then
(
m
=>
m
.
default
()
)
var
config
=
require
(
'
../config
'
)
if
(
!
process
.
env
.
NODE_ENV
)
process
.
env
.
NODE_ENV
=
config
.
dev
.
env
var
path
=
require
(
'
path
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment