uikit 3.16.8-dev.dc18e16fb → 3.16.8

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/build/release.js +67 -20
  3. package/dist/css/uikit-core-rtl.css +1 -1
  4. package/dist/css/uikit-core-rtl.min.css +1 -1
  5. package/dist/css/uikit-core.css +1 -1
  6. package/dist/css/uikit-core.min.css +1 -1
  7. package/dist/css/uikit-rtl.css +1 -1
  8. package/dist/css/uikit-rtl.min.css +1 -1
  9. package/dist/css/uikit.css +1 -1
  10. package/dist/css/uikit.min.css +1 -1
  11. package/dist/js/components/countdown.js +1 -1
  12. package/dist/js/components/countdown.min.js +1 -1
  13. package/dist/js/components/filter.js +1 -1
  14. package/dist/js/components/filter.min.js +1 -1
  15. package/dist/js/components/lightbox-panel.js +1 -1
  16. package/dist/js/components/lightbox-panel.min.js +1 -1
  17. package/dist/js/components/lightbox.js +1 -1
  18. package/dist/js/components/lightbox.min.js +1 -1
  19. package/dist/js/components/notification.js +1 -1
  20. package/dist/js/components/notification.min.js +1 -1
  21. package/dist/js/components/parallax.js +1 -1
  22. package/dist/js/components/parallax.min.js +1 -1
  23. package/dist/js/components/slider-parallax.js +1 -1
  24. package/dist/js/components/slider-parallax.min.js +1 -1
  25. package/dist/js/components/slider.js +1 -1
  26. package/dist/js/components/slider.min.js +1 -1
  27. package/dist/js/components/slideshow-parallax.js +1 -1
  28. package/dist/js/components/slideshow-parallax.min.js +1 -1
  29. package/dist/js/components/slideshow.js +1 -1
  30. package/dist/js/components/slideshow.min.js +1 -1
  31. package/dist/js/components/sortable.js +1 -1
  32. package/dist/js/components/sortable.min.js +1 -1
  33. package/dist/js/components/tooltip.js +1 -1
  34. package/dist/js/components/tooltip.min.js +1 -1
  35. package/dist/js/components/upload.js +1 -1
  36. package/dist/js/components/upload.min.js +1 -1
  37. package/dist/js/uikit-core.js +2 -2
  38. package/dist/js/uikit-core.min.js +1 -1
  39. package/dist/js/uikit-icons.js +1 -1
  40. package/dist/js/uikit-icons.min.js +1 -1
  41. package/dist/js/uikit.js +2 -2
  42. package/dist/js/uikit.min.js +1 -1
  43. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## WIP
3
+ ## 3.16.8 (March 17, 2023)
4
4
 
5
5
  ### Fixed
6
6
 
package/build/release.js CHANGED
@@ -1,28 +1,21 @@
1
1
  import glob from 'glob';
2
- import semver from 'semver';
3
2
  import archiver from 'archiver';
4
3
  import inquirer from 'inquirer';
5
4
  import { createWriteStream } from 'fs';
6
5
  import dateFormat from 'dateformat/lib/dateformat.js';
6
+ import { coerce, gt, inc, prerelease, valid } from 'semver';
7
7
  import { args, getVersion, logFile, replaceInFile, run } from './util.js';
8
8
 
9
- const { coerce, inc, prerelease, valid } = semver;
9
+ const prompt = inquirer.createPromptModule();
10
+
11
+ if (await run('git status --porcelain')) {
12
+ throw 'Repository contains uncommitted changes.';
13
+ }
10
14
 
11
15
  const prevVersion = await getVersion();
12
16
  const version = await inquireVersion(args.v || args.version);
13
17
 
14
- await Promise.all([
15
- run(`npm version ${version} --git-tag-version false`),
16
- replaceInFile('CHANGELOG.md', (data) =>
17
- data.replace(
18
- /^##\s*WIP/m,
19
- `## ${versionFormat(version)} (${dateFormat(Date.now(), 'mmmm d, yyyy')})`
20
- )
21
- ),
22
- replaceInFile('.github/ISSUE_TEMPLATE/bug-report.md', (data) =>
23
- data.replace(prevVersion, version)
24
- ),
25
- ]);
18
+ await raiseVersion(version);
26
19
 
27
20
  await run('pnpm compile');
28
21
  await run('pnpm compile-rtl');
@@ -30,23 +23,44 @@ await run('pnpm build-scss');
30
23
 
31
24
  await createPackage(version);
32
25
 
33
- async function inquireVersion(v) {
34
- if (valid(v)) {
35
- return v;
36
- }
26
+ if (args.d || args.deploy || (await inquireDeploy())) {
27
+ await deploy(version);
28
+ }
37
29
 
38
- const prompt = inquirer.createPromptModule();
30
+ function isValidVersion(version) {
31
+ return valid(version) && gt(version, prevVersion);
32
+ }
33
+
34
+ async function inquireVersion(version) {
35
+ if (isValidVersion(version)) {
36
+ return version;
37
+ }
39
38
 
40
39
  return (
41
40
  await prompt({
42
41
  name: 'version',
43
42
  message: 'Enter a version',
44
43
  default: () => inc(prevVersion, prerelease(prevVersion) ? 'prerelease' : 'patch'),
45
- validate: (val) => !!val.length || 'Invalid version',
44
+ validate: (val) => isValidVersion(val) || 'Invalid version',
46
45
  })
47
46
  ).version;
48
47
  }
49
48
 
49
+ function raiseVersion(version) {
50
+ return Promise.all([
51
+ run(`npm version ${version} --git-tag-version false`),
52
+ replaceInFile('CHANGELOG.md', (data) =>
53
+ data.replace(
54
+ /^##\s*WIP/m,
55
+ `## ${versionFormat(version)} (${dateFormat(Date.now(), 'mmmm d, yyyy')})`
56
+ )
57
+ ),
58
+ replaceInFile('.github/ISSUE_TEMPLATE/bug-report.md', (data) =>
59
+ data.replace(prevVersion, version)
60
+ ),
61
+ ]);
62
+ }
63
+
50
64
  async function createPackage(version) {
51
65
  const file = `dist/uikit-${version}.zip`;
52
66
  const archive = archiver('zip');
@@ -64,3 +78,36 @@ async function createPackage(version) {
64
78
  function versionFormat(version) {
65
79
  return [coerce(version).version].concat(prerelease(version) || []).join(' ');
66
80
  }
81
+
82
+ async function inquireDeploy() {
83
+ return (
84
+ await prompt({
85
+ name: 'deploy',
86
+ type: 'confirm',
87
+ message: 'Do you want to deploy the release?',
88
+ default: true,
89
+ })
90
+ ).deploy;
91
+ }
92
+
93
+ async function deploy(version) {
94
+ await run(`git checkout -b release/v${version}`);
95
+ await run('git stage --all');
96
+ await run(`git commit -am "v${version}"`);
97
+ await run('git checkout main');
98
+ await run(
99
+ `git merge release/v${version} --commit --no-ff -m "Merge branch 'release/v${version}'"`
100
+ );
101
+
102
+ await run(`git tag v${version}`);
103
+ await run('git checkout develop');
104
+ await run(`git merge v${version} --commit --no-ff -m "Merge tag 'v${version}' into develop"`);
105
+ await run(`git branch --delete release/v${version}`);
106
+
107
+ await run('git push origin develop');
108
+ await run('git push origin main --tags');
109
+
110
+ await run('pnpm publish --no-git-checks');
111
+
112
+ await run(`gh release create v${version} -F ./Changelog.md ./dist/uikit-${version}.zip`);
113
+ }
@@ -1,4 +1,4 @@
1
- /*! UIkit 3.16.8-dev.dc18e16fb | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
1
+ /*! UIkit 3.16.8 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */
2
2
  /* ========================================================================
3
3
  Component: Base
4
4
  ========================================================================== */