fomantic-ui 2.9.0-beta.263 → 2.9.0-beta.266
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/nightly.yml +2 -0
- package/dist/components/accordion.css +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/accordion.min.css +1 -1
- package/dist/components/accordion.min.js +1 -1
- package/dist/components/ad.css +1 -1
- package/dist/components/ad.min.css +1 -1
- package/dist/components/api.js +1 -1
- package/dist/components/api.min.js +1 -1
- package/dist/components/breadcrumb.css +1 -1
- package/dist/components/breadcrumb.min.css +1 -1
- package/dist/components/button.css +1 -1
- package/dist/components/button.min.css +1 -1
- package/dist/components/calendar.css +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/calendar.min.css +1 -1
- package/dist/components/calendar.min.js +1 -1
- package/dist/components/card.css +1 -1
- package/dist/components/card.min.css +1 -1
- package/dist/components/checkbox.css +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/checkbox.min.css +1 -1
- package/dist/components/checkbox.min.js +1 -1
- package/dist/components/comment.css +1 -1
- package/dist/components/comment.min.css +1 -1
- package/dist/components/container.css +1 -1
- package/dist/components/container.min.css +1 -1
- package/dist/components/dimmer.css +1 -1
- package/dist/components/dimmer.js +1 -1
- package/dist/components/dimmer.min.css +1 -1
- package/dist/components/dimmer.min.js +1 -1
- package/dist/components/divider.css +1 -1
- package/dist/components/divider.min.css +1 -1
- package/dist/components/dropdown.css +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/dropdown.min.css +1 -1
- package/dist/components/dropdown.min.js +1 -1
- package/dist/components/embed.css +1 -1
- package/dist/components/embed.js +1 -1
- package/dist/components/embed.min.css +1 -1
- package/dist/components/embed.min.js +1 -1
- package/dist/components/feed.css +1 -1
- package/dist/components/feed.min.css +1 -1
- package/dist/components/flag.css +1 -1
- package/dist/components/flag.min.css +1 -1
- package/dist/components/form.css +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/form.min.css +1 -1
- package/dist/components/form.min.js +1 -1
- package/dist/components/grid.css +1 -1
- package/dist/components/grid.min.css +1 -1
- package/dist/components/header.css +1 -1
- package/dist/components/header.min.css +1 -1
- package/dist/components/icon.css +1 -1
- package/dist/components/icon.min.css +1 -1
- package/dist/components/image.css +1 -1
- package/dist/components/image.min.css +1 -1
- package/dist/components/input.css +1 -1
- package/dist/components/input.min.css +1 -1
- package/dist/components/item.css +1 -1
- package/dist/components/item.min.css +1 -1
- package/dist/components/label.css +1 -1
- package/dist/components/label.min.css +1 -1
- package/dist/components/list.css +1 -1
- package/dist/components/list.min.css +1 -1
- package/dist/components/loader.css +1 -1
- package/dist/components/loader.min.css +1 -1
- package/dist/components/message.css +1 -1
- package/dist/components/message.min.css +1 -1
- package/dist/components/modal.css +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/modal.min.css +1 -1
- package/dist/components/modal.min.js +1 -1
- package/dist/components/nag.css +1 -1
- package/dist/components/nag.js +1 -1
- package/dist/components/nag.min.css +1 -1
- package/dist/components/nag.min.js +1 -1
- package/dist/components/placeholder.css +1 -1
- package/dist/components/placeholder.min.css +1 -1
- package/dist/components/popup.css +1 -1
- package/dist/components/popup.js +1 -1
- package/dist/components/popup.min.css +1 -1
- package/dist/components/popup.min.js +1 -1
- package/dist/components/progress.css +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/progress.min.css +1 -1
- package/dist/components/progress.min.js +1 -1
- package/dist/components/rail.css +1 -1
- package/dist/components/rail.min.css +1 -1
- package/dist/components/rating.css +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/rating.min.css +1 -1
- package/dist/components/rating.min.js +1 -1
- package/dist/components/reset.css +1 -1
- package/dist/components/reset.min.css +1 -1
- package/dist/components/reveal.css +1 -1
- package/dist/components/reveal.min.css +1 -1
- package/dist/components/search.css +1 -1
- package/dist/components/search.js +1 -1
- package/dist/components/search.min.css +1 -1
- package/dist/components/search.min.js +1 -1
- package/dist/components/segment.css +1 -1
- package/dist/components/segment.min.css +1 -1
- package/dist/components/shape.css +1 -1
- package/dist/components/shape.js +1 -1
- package/dist/components/shape.min.css +1 -1
- package/dist/components/shape.min.js +1 -1
- package/dist/components/sidebar.css +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.min.css +1 -1
- package/dist/components/sidebar.min.js +1 -1
- package/dist/components/site.css +1 -1
- package/dist/components/site.js +1 -1
- package/dist/components/site.min.css +1 -1
- package/dist/components/site.min.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/slider.min.js +1 -1
- package/dist/components/state.js +1 -1
- package/dist/components/state.min.js +1 -1
- package/dist/components/statistic.css +1 -1
- package/dist/components/statistic.min.css +1 -1
- package/dist/components/step.css +1 -1
- package/dist/components/step.min.css +1 -1
- package/dist/components/sticky.css +1 -1
- package/dist/components/sticky.js +1 -1
- package/dist/components/sticky.min.css +1 -1
- package/dist/components/sticky.min.js +1 -1
- package/dist/components/tab.css +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tab.min.css +1 -1
- package/dist/components/tab.min.js +1 -1
- package/dist/components/table.css +1 -1
- package/dist/components/table.min.css +1 -1
- package/dist/components/text.css +1 -1
- package/dist/components/text.min.css +1 -1
- package/dist/components/toast.css +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toast.min.css +1 -1
- package/dist/components/toast.min.js +1 -1
- package/dist/components/transition.css +1 -1
- package/dist/components/transition.js +1 -1
- package/dist/components/transition.min.css +1 -1
- package/dist/components/transition.min.js +1 -1
- package/dist/components/visibility.js +1 -1
- package/dist/components/visibility.min.js +1 -1
- package/dist/semantic.css +49 -49
- package/dist/semantic.js +25 -25
- package/dist/semantic.min.css +1 -1
- package/dist/semantic.min.js +1 -1
- package/package.json +1 -2
- package/scripts/nightly-version.js +39 -39
@@ -1,6 +1,7 @@
|
|
1
1
|
// node
|
2
2
|
const fs = require('fs')
|
3
3
|
const path = require('path')
|
4
|
+
const childProcess = require('child_process')
|
4
5
|
|
5
6
|
// npm
|
6
7
|
const fetch = require('node-fetch')
|
@@ -8,65 +9,64 @@ const semver = require('semver')
|
|
8
9
|
|
9
10
|
// pkg
|
10
11
|
const pkg = require('../package.json')
|
12
|
+
const process = require('process')
|
11
13
|
|
12
14
|
const ghBase = 'https://api.github.com'
|
13
15
|
const repoUrlPath = 'fomantic/Fomantic-UI'
|
14
16
|
const npmBase = 'https://registry.npmjs.org'
|
15
17
|
const npmPackage = 'fomantic-ui'
|
18
|
+
const currentRev = childProcess // get the current rev from the repo
|
19
|
+
.execSync('git rev-parse HEAD')
|
20
|
+
.toString()
|
21
|
+
.trim()
|
22
|
+
.substr(0, 7)
|
16
23
|
|
17
|
-
|
18
|
-
const
|
19
|
-
return fetch(`${ghBase}/repos/${repoUrlPath}/milestones`)
|
20
|
-
.then(r => r.json())
|
21
|
-
.then(milestones => milestones.filter(m => m.title.indexOf('x') === -1).map(m => m.title).sort()[0])
|
22
|
-
}
|
23
|
-
|
24
|
-
const getCurrentNpmVersion = async function () {
|
25
|
-
return fetch(`${npmBase}/${npmPackage}`)
|
24
|
+
const getNextVersion = async function () {
|
25
|
+
const versions = await fetch(`${ghBase}/repos/${repoUrlPath}/milestones`)
|
26
26
|
.then(r => r.json())
|
27
|
-
.then(
|
28
|
-
|
27
|
+
.then(milestones => milestones.filter(m => m.title.indexOf('x') === -1)) // remove all versions with `x` in it
|
28
|
+
.then(versions => versions.map(m => m.title)) // create array of versions
|
29
|
+
.then(versions => semver.sort(versions))
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
.then(p => p['dist-tags'].nightly)
|
34
|
-
.then(v => semver.prerelease(v))
|
35
|
-
.then(pr => pr === null ? ['beta', 0] : pr)
|
31
|
+
// Return first entry aka the smallest version in milestones which would therefore
|
32
|
+
// be the next version
|
33
|
+
return semver.parse(versions[0])
|
36
34
|
}
|
37
35
|
|
38
|
-
const
|
39
|
-
//
|
40
|
-
|
41
|
-
|
36
|
+
const getPublishedVersion = async function () {
|
37
|
+
// get the latest published nightly tagged version
|
38
|
+
return semver.parse(
|
39
|
+
await fetch(`${npmBase}/${npmPackage}`)
|
42
40
|
.then(r => r.json())
|
43
|
-
.then(p =>
|
41
|
+
.then(p => p['dist-tags'].nightly)
|
42
|
+
)
|
44
43
|
}
|
45
44
|
|
46
45
|
const getNightlyVersion = async function () {
|
47
|
-
const
|
48
|
-
const
|
49
|
-
const currentNightly = `${currentNightlyWithPre.major}.${currentNightlyWithPre.minor}.${currentNightlyWithPre.patch}`
|
50
|
-
const allNpmVersions = await getAllNpmVersions()
|
51
|
-
let nightlyVersion = `${nextVersion}-beta.0`
|
46
|
+
const next = semver.parse(await getNextVersion())
|
47
|
+
const current = semver.parse(await getPublishedVersion())
|
52
48
|
|
53
|
-
if (
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
`${nextVersion}-${preRelease[0]}.${preRelease[1]}`,
|
58
|
-
'prerelease'
|
59
|
-
)
|
49
|
+
if (current.build[0] === currentRev) {
|
50
|
+
console.log('No new commits since last publish. Exiting.')
|
51
|
+
process.exit(1)
|
52
|
+
return
|
60
53
|
}
|
61
|
-
|
62
|
-
|
54
|
+
|
55
|
+
let nightlyVersion = `${next.version}-beta.0`
|
56
|
+
|
57
|
+
// Check if published version is the same version as next version.
|
58
|
+
// Only check major, minor and patch as previously published nightly
|
59
|
+
// versions would include prerelease tag and build metadata
|
60
|
+
if (semver.eq(`${next.major}.${next.minor}.${next.patch}`, `${current.major}.${current.minor}.${current.patch}`)) {
|
61
|
+
// If they match then a nightly version has already been published, so we need to increment
|
62
|
+
// the prerelease and add the new rev as build metadata
|
63
63
|
nightlyVersion = semver.inc(
|
64
|
-
|
65
|
-
|
64
|
+
`${next.version}-beta.${current.prerelease[1]}`,
|
65
|
+
'prerelease'
|
66
66
|
)
|
67
67
|
}
|
68
68
|
|
69
|
-
return nightlyVersion
|
69
|
+
return `${nightlyVersion}+${currentRev}`
|
70
70
|
}
|
71
71
|
|
72
72
|
getNightlyVersion()
|