projen 0.80.6 → 0.80.7
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/.jsii +41 -41
- package/lib/awscdk/auto-discover.js +5 -5
- package/lib/awscdk/awscdk-app-java.js +1 -1
- package/lib/awscdk/awscdk-app-py.js +1 -1
- package/lib/awscdk/awscdk-app-ts.js +1 -1
- package/lib/awscdk/awscdk-construct.js +2 -2
- package/lib/awscdk/awscdk-deps-java.js +1 -1
- package/lib/awscdk/awscdk-deps-js.js +1 -1
- package/lib/awscdk/awscdk-deps-py.js +1 -1
- package/lib/awscdk/awscdk-deps.js +1 -1
- package/lib/awscdk/cdk-config.js +1 -1
- package/lib/awscdk/cdk-tasks.js +1 -1
- package/lib/awscdk/integration-test.js +1 -1
- package/lib/awscdk/lambda-extension.js +1 -1
- package/lib/awscdk/lambda-function.js +2 -2
- package/lib/build/build-workflow.js +1 -1
- package/lib/cdk/auto-discover-base.js +2 -2
- package/lib/cdk/construct-lib.js +1 -1
- package/lib/cdk/integration-test-base.js +1 -1
- package/lib/cdk/jsii-docgen.js +1 -1
- package/lib/cdk/jsii-project.js +1 -1
- package/lib/cdk8s/auto-discover.js +2 -2
- package/lib/cdk8s/cdk8s-app-py.js +1 -1
- package/lib/cdk8s/cdk8s-app-ts.js +1 -1
- package/lib/cdk8s/cdk8s-construct.js +1 -1
- package/lib/cdk8s/cdk8s-deps-py.js +1 -1
- package/lib/cdk8s/cdk8s-deps.js +1 -1
- package/lib/cdk8s/integration-test.js +1 -1
- package/lib/cdktf/cdktf-construct.js +1 -1
- package/lib/circleci/circleci.js +1 -1
- package/lib/component.js +1 -1
- package/lib/dependencies.js +1 -1
- package/lib/dev-env.js +1 -1
- package/lib/docker-compose/docker-compose-service.js +1 -1
- package/lib/docker-compose/docker-compose.js +1 -1
- package/lib/file.js +1 -1
- package/lib/gitattributes.js +1 -1
- package/lib/github/actions-provider.js +1 -1
- package/lib/github/auto-approve.js +1 -1
- package/lib/github/auto-merge.js +1 -1
- package/lib/github/dependabot.js +1 -1
- package/lib/github/github-credentials.js +1 -1
- package/lib/github/github-project.js +1 -1
- package/lib/github/github.js +1 -1
- package/lib/github/mergify.js +1 -1
- package/lib/github/pr-template.js +1 -1
- package/lib/github/pull-request-lint.js +1 -1
- package/lib/github/stale.js +1 -1
- package/lib/github/task-workflow-job.js +1 -1
- package/lib/github/task-workflow.js +1 -1
- package/lib/github/workflow-actions.js +1 -1
- package/lib/github/workflow-jobs.js +1 -1
- package/lib/github/workflow-steps.js +1 -1
- package/lib/github/workflows.js +1 -1
- package/lib/gitlab/configuration.js +1 -1
- package/lib/gitlab/gitlab-configuration.js +1 -1
- package/lib/gitlab/nested-configuration.js +1 -1
- package/lib/gitpod.js +1 -1
- package/lib/ignore-file.js +1 -1
- package/lib/ini.js +1 -1
- package/lib/java/java-project.js +1 -1
- package/lib/java/junit.js +1 -1
- package/lib/java/maven-compile.js +1 -1
- package/lib/java/maven-packaging.js +1 -1
- package/lib/java/maven-sample.js +1 -1
- package/lib/java/pom.js +1 -1
- package/lib/java/projenrc.js +1 -1
- package/lib/javascript/bundler.js +1 -1
- package/lib/javascript/eslint.js +1 -1
- package/lib/javascript/jest.js +4 -4
- package/lib/javascript/license-checker.js +1 -1
- package/lib/javascript/node-package.js +1 -1
- package/lib/javascript/node-project.js +1 -1
- package/lib/javascript/npm-config.js +1 -1
- package/lib/javascript/prettier.js +1 -1
- package/lib/javascript/projenrc.js +1 -1
- package/lib/javascript/typescript-config.js +2 -2
- package/lib/javascript/upgrade-dependencies.js +2 -2
- package/lib/javascript/yarnrc.js +1 -1
- package/lib/json-patch.js +1 -1
- package/lib/json.js +1 -1
- package/lib/license.js +1 -1
- package/lib/logger.js +1 -1
- package/lib/makefile.js +1 -1
- package/lib/object-file.js +1 -1
- package/lib/project-build.js +1 -1
- package/lib/project-tree.js +1 -1
- package/lib/project.js +1 -1
- package/lib/projects.js +1 -1
- package/lib/projenrc-json.js +2 -2
- package/lib/projenrc.js +1 -1
- package/lib/python/pip.js +1 -1
- package/lib/python/poetry.d.ts +7 -3
- package/lib/python/poetry.js +43 -21
- package/lib/python/projenrc.js +1 -1
- package/lib/python/pytest-sample.js +1 -1
- package/lib/python/pytest.js +1 -1
- package/lib/python/python-project.js +1 -1
- package/lib/python/python-sample.js +1 -1
- package/lib/python/requirements-file.js +1 -1
- package/lib/python/setuppy.js +1 -1
- package/lib/python/setuptools.js +1 -1
- package/lib/python/venv.js +1 -1
- package/lib/readme.js +1 -1
- package/lib/release/publisher.js +1 -1
- package/lib/release/release-trigger.js +1 -1
- package/lib/release/release.js +1 -1
- package/lib/renovatebot.js +1 -1
- package/lib/sample-file.js +2 -2
- package/lib/semver.js +1 -1
- package/lib/source-code.js +1 -1
- package/lib/task-runtime.js +1 -1
- package/lib/task.js +1 -1
- package/lib/tasks.js +1 -1
- package/lib/testing.js +1 -1
- package/lib/textfile.js +1 -1
- package/lib/toml.js +10 -8
- package/lib/typescript/projenrc-ts.js +1 -1
- package/lib/typescript/projenrc.js +1 -1
- package/lib/typescript/typescript-typedoc.js +1 -1
- package/lib/typescript/typescript.js +6 -6
- package/lib/version.js +2 -2
- package/lib/vscode/devcontainer.js +1 -1
- package/lib/vscode/extensions.js +1 -1
- package/lib/vscode/launch-config.js +1 -1
- package/lib/vscode/settings.js +1 -1
- package/lib/vscode/vscode.js +1 -1
- package/lib/web/next.js +3 -3
- package/lib/web/postcss.js +1 -1
- package/lib/web/react.js +4 -4
- package/lib/web/tailwind.js +1 -1
- package/lib/xmlfile.js +1 -1
- package/lib/yaml.js +1 -1
- package/node_modules/json2toml/CHANGELOG.md +128 -0
- package/node_modules/json2toml/LICENSE.txt +18 -0
- package/node_modules/json2toml/README.md +52 -0
- package/node_modules/json2toml/index.d.ts +13 -0
- package/node_modules/json2toml/index.js +160 -0
- package/node_modules/json2toml/package.json +62 -0
- package/node_modules/lodash.isdate/LICENSE +47 -0
- package/node_modules/lodash.isdate/README.md +18 -0
- package/node_modules/lodash.isdate/index.js +119 -0
- package/node_modules/lodash.isdate/package.json +17 -0
- package/node_modules/lodash.isempty/LICENSE +47 -0
- package/node_modules/lodash.isempty/README.md +18 -0
- package/node_modules/lodash.isempty/index.js +582 -0
- package/node_modules/lodash.isempty/package.json +17 -0
- package/node_modules/lodash.isplainobject/LICENSE +47 -0
- package/node_modules/lodash.isplainobject/README.md +18 -0
- package/node_modules/lodash.isplainobject/index.js +139 -0
- package/node_modules/lodash.isplainobject/package.json +17 -0
- package/node_modules/strftime/Changelog.md +286 -0
- package/node_modules/strftime/Makefile +15 -0
- package/node_modules/strftime/Readme.md +208 -0
- package/node_modules/strftime/bower.json +13 -0
- package/node_modules/strftime/component.json +16 -0
- package/node_modules/strftime/package.json +53 -0
- package/node_modules/strftime/strftime-min.js +21 -0
- package/node_modules/strftime/strftime.js +854 -0
- package/node_modules/strftime/test.js +271 -0
- package/package.json +4 -3
- package/node_modules/@iarna/toml/LICENSE +0 -14
- package/node_modules/@iarna/toml/README.md +0 -301
- package/node_modules/@iarna/toml/index.d.ts +0 -57
- package/node_modules/@iarna/toml/lib/create-date.js +0 -23
- package/node_modules/@iarna/toml/lib/create-datetime-float.js +0 -24
- package/node_modules/@iarna/toml/lib/create-datetime.js +0 -10
- package/node_modules/@iarna/toml/lib/create-time.js +0 -22
- package/node_modules/@iarna/toml/lib/format-num.js +0 -6
- package/node_modules/@iarna/toml/lib/parser-debug.js +0 -60
- package/node_modules/@iarna/toml/lib/parser.js +0 -127
- package/node_modules/@iarna/toml/lib/toml-parser.js +0 -1379
- package/node_modules/@iarna/toml/package.json +0 -82
- package/node_modules/@iarna/toml/parse-async.js +0 -30
- package/node_modules/@iarna/toml/parse-pretty-error.js +0 -33
- package/node_modules/@iarna/toml/parse-stream.js +0 -80
- package/node_modules/@iarna/toml/parse-string.js +0 -18
- package/node_modules/@iarna/toml/parse.js +0 -5
- package/node_modules/@iarna/toml/stringify.js +0 -296
- package/node_modules/@iarna/toml/toml.js +0 -3
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
3
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
4
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
5
|
+
* Released under MIT license <https://lodash.com/license>
|
|
6
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
7
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** `Object#toString` result references. */
|
|
11
|
+
var objectTag = '[object Object]';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Checks if `value` is a host object in IE < 9.
|
|
15
|
+
*
|
|
16
|
+
* @private
|
|
17
|
+
* @param {*} value The value to check.
|
|
18
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
19
|
+
*/
|
|
20
|
+
function isHostObject(value) {
|
|
21
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
22
|
+
// despite having improperly defined `toString` methods.
|
|
23
|
+
var result = false;
|
|
24
|
+
if (value != null && typeof value.toString != 'function') {
|
|
25
|
+
try {
|
|
26
|
+
result = !!(value + '');
|
|
27
|
+
} catch (e) {}
|
|
28
|
+
}
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
34
|
+
*
|
|
35
|
+
* @private
|
|
36
|
+
* @param {Function} func The function to wrap.
|
|
37
|
+
* @param {Function} transform The argument transform.
|
|
38
|
+
* @returns {Function} Returns the new function.
|
|
39
|
+
*/
|
|
40
|
+
function overArg(func, transform) {
|
|
41
|
+
return function(arg) {
|
|
42
|
+
return func(transform(arg));
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** Used for built-in method references. */
|
|
47
|
+
var funcProto = Function.prototype,
|
|
48
|
+
objectProto = Object.prototype;
|
|
49
|
+
|
|
50
|
+
/** Used to resolve the decompiled source of functions. */
|
|
51
|
+
var funcToString = funcProto.toString;
|
|
52
|
+
|
|
53
|
+
/** Used to check objects for own properties. */
|
|
54
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
55
|
+
|
|
56
|
+
/** Used to infer the `Object` constructor. */
|
|
57
|
+
var objectCtorString = funcToString.call(Object);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Used to resolve the
|
|
61
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
62
|
+
* of values.
|
|
63
|
+
*/
|
|
64
|
+
var objectToString = objectProto.toString;
|
|
65
|
+
|
|
66
|
+
/** Built-in value references. */
|
|
67
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
71
|
+
* and has a `typeof` result of "object".
|
|
72
|
+
*
|
|
73
|
+
* @static
|
|
74
|
+
* @memberOf _
|
|
75
|
+
* @since 4.0.0
|
|
76
|
+
* @category Lang
|
|
77
|
+
* @param {*} value The value to check.
|
|
78
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
79
|
+
* @example
|
|
80
|
+
*
|
|
81
|
+
* _.isObjectLike({});
|
|
82
|
+
* // => true
|
|
83
|
+
*
|
|
84
|
+
* _.isObjectLike([1, 2, 3]);
|
|
85
|
+
* // => true
|
|
86
|
+
*
|
|
87
|
+
* _.isObjectLike(_.noop);
|
|
88
|
+
* // => false
|
|
89
|
+
*
|
|
90
|
+
* _.isObjectLike(null);
|
|
91
|
+
* // => false
|
|
92
|
+
*/
|
|
93
|
+
function isObjectLike(value) {
|
|
94
|
+
return !!value && typeof value == 'object';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
99
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
100
|
+
*
|
|
101
|
+
* @static
|
|
102
|
+
* @memberOf _
|
|
103
|
+
* @since 0.8.0
|
|
104
|
+
* @category Lang
|
|
105
|
+
* @param {*} value The value to check.
|
|
106
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
107
|
+
* @example
|
|
108
|
+
*
|
|
109
|
+
* function Foo() {
|
|
110
|
+
* this.a = 1;
|
|
111
|
+
* }
|
|
112
|
+
*
|
|
113
|
+
* _.isPlainObject(new Foo);
|
|
114
|
+
* // => false
|
|
115
|
+
*
|
|
116
|
+
* _.isPlainObject([1, 2, 3]);
|
|
117
|
+
* // => false
|
|
118
|
+
*
|
|
119
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
120
|
+
* // => true
|
|
121
|
+
*
|
|
122
|
+
* _.isPlainObject(Object.create(null));
|
|
123
|
+
* // => true
|
|
124
|
+
*/
|
|
125
|
+
function isPlainObject(value) {
|
|
126
|
+
if (!isObjectLike(value) ||
|
|
127
|
+
objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
var proto = getPrototype(value);
|
|
131
|
+
if (proto === null) {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
135
|
+
return (typeof Ctor == 'function' &&
|
|
136
|
+
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
module.exports = isPlainObject;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lodash.isplainobject",
|
|
3
|
+
"version": "4.0.6",
|
|
4
|
+
"description": "The lodash method `_.isPlainObject` exported as a module.",
|
|
5
|
+
"homepage": "https://lodash.com/",
|
|
6
|
+
"icon": "https://lodash.com/icon.svg",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"keywords": "lodash-modularized, isplainobject",
|
|
9
|
+
"author": "John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
|
10
|
+
"contributors": [
|
|
11
|
+
"John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/)",
|
|
12
|
+
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
|
|
13
|
+
"Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)"
|
|
14
|
+
],
|
|
15
|
+
"repository": "lodash/lodash",
|
|
16
|
+
"scripts": { "test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\"" }
|
|
17
|
+
}
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
v0.10.2 on 2023-05-24
|
|
2
|
+
|
|
3
|
+
- Fix test case for %c in current versions of node.js
|
|
4
|
+
|
|
5
|
+
- Fix %-y so it omits the leading zero
|
|
6
|
+
|
|
7
|
+
Thanks to [Aryan Arora](https://github.com/aryan-debug) for both fixes!
|
|
8
|
+
|
|
9
|
+
v0.10.1 on 2021-12-12
|
|
10
|
+
---------------------
|
|
11
|
+
|
|
12
|
+
- Fix it_IT shortMonths locale
|
|
13
|
+
Thanks to [Douglas de Espindola](https://github.com/douglasep)
|
|
14
|
+
|
|
15
|
+
- Try to get a short time zone name for %Z, falling back to the long one. This attempts to work around a change to Date.toString in v8 (node v10+, Chrome 66+). Unfortunately sometimes Date.toLocaleString returns a time zone like GMT+2 and we fall back to the long name in that case.
|
|
16
|
+
|
|
17
|
+
v0.10.0 on 2016-12-28
|
|
18
|
+
---------------------
|
|
19
|
+
|
|
20
|
+
- Remove the old API deprecated in v0.9.
|
|
21
|
+
|
|
22
|
+
- Bundle some locales that you can use with `strftime.localizeByIdentifier('nl_NL')`. Full list available in the [readme](https://github.com/samsonjs/strftime/blob/master/Readme.md).
|
|
23
|
+
Thanks to [Andrew Pirondini](https://github.com/andrewjpiro) of [iFixit](https://ifixit.com)
|
|
24
|
+
|
|
25
|
+
- Add instructions to install with Yarn.
|
|
26
|
+
Thanks to [Ayman Nedjmeddine](https://github.com/IOAyman)
|
|
27
|
+
|
|
28
|
+
- Unrecognized format specifiers preserve the % sign, e.g. `strftime('%K') => "%K"`.
|
|
29
|
+
Thanks to [Kevin Jin](https://github.com/Kevin-Jin)
|
|
30
|
+
|
|
31
|
+
- Make `strftime` work with dates that have been extended by [DateJS](http://www.datejs.com).
|
|
32
|
+
Thanks to [Stian Grytøyr](https://github.com/stiang)
|
|
33
|
+
|
|
34
|
+
- Add instructions to install with Yarn.
|
|
35
|
+
Thanks to [Ayman Nedjmeddine](https://github.com/IOAyman)
|
|
36
|
+
|
|
37
|
+
- Fix UTC formatting of dates that cross a DST boundary.
|
|
38
|
+
Thanks to [ray007](https://github.com/ray007)
|
|
39
|
+
|
|
40
|
+
- Allow localizing ordinals.
|
|
41
|
+
Thanks to [Simon Liétar](https://github.com/Sim9760)
|
|
42
|
+
|
|
43
|
+
v0.9.2 on 2015-05-29
|
|
44
|
+
--------------------
|
|
45
|
+
|
|
46
|
+
- fix a caching bug, which was a regression in 0.9.0 ([issue #63](https://github.com/samsonjs/strftime/issues/63))
|
|
47
|
+
|
|
48
|
+
- update license attribute in package.json as required by npm
|
|
49
|
+
Thanks to [Peter deHaan](https://github.com/pdehaan)
|
|
50
|
+
|
|
51
|
+
- construct GMT times used in tests in a more robust way
|
|
52
|
+
|
|
53
|
+
- fix a bug calculating week numbers ([issue #56](https://github.com/samsonjs/strftime/issues/56))
|
|
54
|
+
Thanks to [Alexandr Nikitin](https://github.com/alexandrnikitin)
|
|
55
|
+
|
|
56
|
+
- warn about possible misuse of %:: or %::: modifiers
|
|
57
|
+
|
|
58
|
+
v0.9.1 on 2015-03-16
|
|
59
|
+
--------------------
|
|
60
|
+
|
|
61
|
+
- re-fix [issue #38](https://github.com/samsonjs/strftime/pull/38) which was lost in the v0.9 merge
|
|
62
|
+
|
|
63
|
+
- add this changelog
|
|
64
|
+
|
|
65
|
+
v0.9.0 on 2015-03-15
|
|
66
|
+
--------------------
|
|
67
|
+
|
|
68
|
+
This release marks the final run up to v1.0, which should be released by March 2016.
|
|
69
|
+
|
|
70
|
+
The headline feature is a huge performance boost resulting from [this contest](http://hola.org/challenge_js). [Alexandr Nikitin](https://github.com/alexandrnikitin) has essentially [rewritten](https://github.com/samsonjs/strftime/pull/41) the code and [the results](http://jsperf.com/strftime-optimization/2) speak for themselves.
|
|
71
|
+
|
|
72
|
+
Along with this the API has been unified and cleaned up. `strftimeTZ`, `strftimeUTC`, and `localizedStrftime` have all been deprecated in favour of the following functions: `timezone(tz)`, `utc()`, and `localize(locale)`. You use them like so:
|
|
73
|
+
|
|
74
|
+
```JavaScript
|
|
75
|
+
var strftime = require('strftime'); // not required in web browsers
|
|
76
|
+
|
|
77
|
+
var strftimeIT = strftime.localize(anItalianLocale);
|
|
78
|
+
var strftimePST = strftime.timezone('-0800');
|
|
79
|
+
var strftimeUTC = strftime.utc();
|
|
80
|
+
|
|
81
|
+
// You can combine them
|
|
82
|
+
var strftimeIT_PST = strftimeIT.timezone('-0800');
|
|
83
|
+
|
|
84
|
+
// And chain them all at once
|
|
85
|
+
var strftimeIT_PST = strftime.localize(anItalianLocale).timezone('-0800');
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The previous API is deprecated and will be removed for v1.0. The good news is that the previous API is supported by adapting the new API, so you get most of the performance benefits before you even update your code to use the new API.
|
|
89
|
+
|
|
90
|
+
The new API does not support passing in a custom timezone or locale on each call to `strftime`. This is a regression so if you really need this use case [let us know](https://github.com/samsonjs/strftime/issues/new) and we'll figure something out.
|
|
91
|
+
|
|
92
|
+
Thanks to all contributors that have helped to improve this library over the past 4 years.
|
|
93
|
+
|
|
94
|
+
v0.8.4 on 2015-03-05
|
|
95
|
+
--------------------
|
|
96
|
+
|
|
97
|
+
- fix conversion of dates to UTC
|
|
98
|
+
Thanks to [Alexandr Nikitin](https://github.com/alexandrnikitin)
|
|
99
|
+
|
|
100
|
+
- extend `%z` with a colon separator in timezone offsets, `"[+-]HH:MM"`
|
|
101
|
+
Thanks to [Cory Heslip](https://github.com/cheslip)
|
|
102
|
+
|
|
103
|
+
- ignore irrelevant files in bower.json
|
|
104
|
+
|
|
105
|
+
v0.8.3 on 2015-02-08
|
|
106
|
+
--------------------
|
|
107
|
+
|
|
108
|
+
First release for [Bower](http://bower.io), and only released for Bower.
|
|
109
|
+
|
|
110
|
+
v0.8.2 on 2014-08-08
|
|
111
|
+
--------------------
|
|
112
|
+
|
|
113
|
+
- fix `%e` which is supposed to be padded with a space
|
|
114
|
+
|
|
115
|
+
v0.8.1 on 2014-06-17
|
|
116
|
+
--------------------
|
|
117
|
+
|
|
118
|
+
- fix `%Z` when the timezone contains spaces
|
|
119
|
+
Thanks to [w0den](https://github.com/w0den)
|
|
120
|
+
|
|
121
|
+
- fix examples using `%Y` in the readme
|
|
122
|
+
Thanks to [Ryan Regalado](https://github.com/d48)
|
|
123
|
+
|
|
124
|
+
- fix a bug when specifying minutes in the timezone
|
|
125
|
+
Thanks to [Alexandr Nikitin](https://github.com/alexandrnikitin)
|
|
126
|
+
|
|
127
|
+
v0.8.0 on 2014-01-29
|
|
128
|
+
--------------------
|
|
129
|
+
|
|
130
|
+
- allow timezones to be specified as strings of the form `"+0100"` or `"-0800"` (`[+-]HHMM`)
|
|
131
|
+
|
|
132
|
+
- fix a bug running tests where the environment variable `TZ` is empty and the system timezone is not PST/PDT
|
|
133
|
+
|
|
134
|
+
v0.7.0 on 2013-11-08
|
|
135
|
+
--------------------
|
|
136
|
+
|
|
137
|
+
- add support for passing in explicit timezones with `strftimeTZ` which accepts numeric offsets from GMT, in minutes
|
|
138
|
+
|
|
139
|
+
v0.6.2 on 2013-08-29
|
|
140
|
+
--------------------
|
|
141
|
+
|
|
142
|
+
- expose `strftimeUTC` and `localizedStrftime` properly in browsers
|
|
143
|
+
|
|
144
|
+
v0.6.1 on 2013-06-13
|
|
145
|
+
--------------------
|
|
146
|
+
|
|
147
|
+
- fix a bug where `RequiredDateMethods` was created as a global
|
|
148
|
+
|
|
149
|
+
v0.6.0 on 2013-05-15
|
|
150
|
+
--------------------
|
|
151
|
+
|
|
152
|
+
- add `%o` to get the day of the month as an ordinal (in English)
|
|
153
|
+
|
|
154
|
+
v0.5.2 on 2013-04-07
|
|
155
|
+
--------------------
|
|
156
|
+
|
|
157
|
+
- add some Ruby extension prefixes: `-`, `_`, and `0`, and they work like so:
|
|
158
|
+
`strftime('%-d') // => "7"`
|
|
159
|
+
`strftime('%_d') // => " 7"`
|
|
160
|
+
`strftime('%0d') // => "07"`
|
|
161
|
+
|
|
162
|
+
- fix padding the day-of-year in `%j`
|
|
163
|
+
|
|
164
|
+
- add a minified version of the code to the repo for easy distribution with some package managers
|
|
165
|
+
|
|
166
|
+
v0.5.1 on 2013-03-07
|
|
167
|
+
--------------------
|
|
168
|
+
|
|
169
|
+
- remove deprecated `getLocalizedStrftime` function
|
|
170
|
+
|
|
171
|
+
- make `%C` pad the century with spaces, like C
|
|
172
|
+
|
|
173
|
+
- list all supported specifiers in the readme, it's no longer fair to say "look at `man 3 strftime`"
|
|
174
|
+
|
|
175
|
+
- use fixed dates in the readme instead of "now", so people can execute the examples and see the same results
|
|
176
|
+
Thanks to [John Zwinck](https://github.com/jzwinck)
|
|
177
|
+
|
|
178
|
+
- fix `%z` for timezones greater than GMT
|
|
179
|
+
|
|
180
|
+
- support any `Date`-like objects instead of checking for actual instances of `Date`
|
|
181
|
+
|
|
182
|
+
v0.5.0 on 2013-01-05
|
|
183
|
+
--------------------
|
|
184
|
+
|
|
185
|
+
- add week numbers `%U` and `%W`
|
|
186
|
+
|
|
187
|
+
- add support for [component](https://github.com/componentjs/component)
|
|
188
|
+
Thanks to [TJ Holowaychuk](https://github.com/tj)
|
|
189
|
+
|
|
190
|
+
v0.4.8 on 2012-11-13
|
|
191
|
+
--------------------
|
|
192
|
+
|
|
193
|
+
- add `%j` and `%C`, thanks to [Ryan Stafford](https://github.com/ryanstafford)
|
|
194
|
+
|
|
195
|
+
v0.4.7 on 2012-06-08
|
|
196
|
+
--------------------
|
|
197
|
+
|
|
198
|
+
- add `%P` which is "am" or "pm", like `%p` but lowercase
|
|
199
|
+
(this makes no sense, and I am sorry for propagating this madness)
|
|
200
|
+
Thanks to [Rob Colburn](https://github.com/robcolburn)
|
|
201
|
+
|
|
202
|
+
- export the `strftime` function directly in [node](https://nodejs.org) so you can write `strftime = require('strftime')` instead of `strftime = require('strftime').strftime`
|
|
203
|
+
|
|
204
|
+
- added contributors to the readme and package.json
|
|
205
|
+
|
|
206
|
+
v0.4.6 on 2011-06-13
|
|
207
|
+
--------------------
|
|
208
|
+
|
|
209
|
+
- rename `getLocalizedStrftime(locale)` to `localizedStrftime(locale)`
|
|
210
|
+
The old name is deprecated and will stick around until v0.5 or v0.6.
|
|
211
|
+
|
|
212
|
+
- add tests for locales
|
|
213
|
+
|
|
214
|
+
v0.4.5 on 2011-06-08
|
|
215
|
+
--------------------
|
|
216
|
+
|
|
217
|
+
- fix the sign of `%z`, which is something like "+0100" or "-0800" (`[+-]HHMM`)
|
|
218
|
+
|
|
219
|
+
- improve test coverage
|
|
220
|
+
|
|
221
|
+
v0.4.4 on 2011-06-07
|
|
222
|
+
--------------------
|
|
223
|
+
|
|
224
|
+
- fix `%L` for values < 100
|
|
225
|
+
|
|
226
|
+
- convert tests from CoffeeScript to JavaScript
|
|
227
|
+
(nothing personal, just keeping the dependencies trim)
|
|
228
|
+
|
|
229
|
+
v0.4.3 on 2011-06-05
|
|
230
|
+
--------------------
|
|
231
|
+
|
|
232
|
+
This release was all [Andrew Schaaf](https://github.com/andrewschaaf).
|
|
233
|
+
|
|
234
|
+
- add some tests
|
|
235
|
+
|
|
236
|
+
- fix `%s` which is seconds since the Unix epoch, but was in milliseconds
|
|
237
|
+
|
|
238
|
+
- add `%L` for 3-digit milliseconds
|
|
239
|
+
|
|
240
|
+
v0.4.2 on 2011-06-05
|
|
241
|
+
--------------------
|
|
242
|
+
|
|
243
|
+
- add `strftimeUTC` for ignoring timezones
|
|
244
|
+
Thanks to [Andrew Schaaf](https://github.com/andrewschaaf)
|
|
245
|
+
|
|
246
|
+
- support exporting to the top level object in ES5 strict mode
|
|
247
|
+
|
|
248
|
+
v0.4.1 on 2011-06-02
|
|
249
|
+
--------------------
|
|
250
|
+
|
|
251
|
+
- fix `%y` for years outside the range [1900, 2099]
|
|
252
|
+
|
|
253
|
+
v0.4.0 on 2011-04-28
|
|
254
|
+
--------------------
|
|
255
|
+
|
|
256
|
+
- add support for localization
|
|
257
|
+
|
|
258
|
+
v0.3.0 on 2010-12-17
|
|
259
|
+
--------------------
|
|
260
|
+
|
|
261
|
+
- fix export for browsers
|
|
262
|
+
|
|
263
|
+
v0.2.3 on 2010-12-15
|
|
264
|
+
--------------------
|
|
265
|
+
|
|
266
|
+
- set required [node](https://nodejs.org) version to 0.2 instead of 0.3 in package.json
|
|
267
|
+
|
|
268
|
+
v0.2.2 on 2010-11-14
|
|
269
|
+
--------------------
|
|
270
|
+
|
|
271
|
+
- fix module export
|
|
272
|
+
|
|
273
|
+
v0.2.1 on 2010-11-11
|
|
274
|
+
--------------------
|
|
275
|
+
|
|
276
|
+
- bug fix for recursive formats
|
|
277
|
+
|
|
278
|
+
v0.2.0 on 2010-11-11
|
|
279
|
+
--------------------
|
|
280
|
+
|
|
281
|
+
- use `String.prototype.replace` instead of a `for` loop
|
|
282
|
+
|
|
283
|
+
v0.1.0 on 2010-11-11
|
|
284
|
+
--------------------
|
|
285
|
+
|
|
286
|
+
Initial release.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
minify: real-minify test-minified
|
|
2
|
+
|
|
3
|
+
real-minify: strftime.js
|
|
4
|
+
rm -f strftime-min.js
|
|
5
|
+
closure-compiler <strftime.js >|strftime-min.js
|
|
6
|
+
|
|
7
|
+
test:
|
|
8
|
+
TZ=America/Vancouver node test.js
|
|
9
|
+
TZ=Europe/Amsterdam node test.js
|
|
10
|
+
|
|
11
|
+
test-minified: minify
|
|
12
|
+
TZ=America/Vancouver node test.js ./strftime-min.js
|
|
13
|
+
TZ=Europe/Amsterdam node test.js ./strftime-min.js
|
|
14
|
+
|
|
15
|
+
.PHONY: test test-minified
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
strftime
|
|
2
|
+
========
|
|
3
|
+
|
|
4
|
+
strftime for JavaScript. Works in (at least) node.js and browsers. Supports localization and timezones. Most standard specifiers from C are supported as well as some other extensions from Ruby.
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/strftime) [](https://nodejs.org) [](https://sjs.mit-license.org)
|
|
7
|
+
|
|
8
|
+
Installation
|
|
9
|
+
============
|
|
10
|
+
|
|
11
|
+
[node](https://nodejs.org):
|
|
12
|
+
|
|
13
|
+
npm install strftime
|
|
14
|
+
|
|
15
|
+
[bower](http://bower.io):
|
|
16
|
+
|
|
17
|
+
bower install strftime
|
|
18
|
+
|
|
19
|
+
[component](https://github.com/componentjs/component):
|
|
20
|
+
|
|
21
|
+
component install samsonjs/strftime
|
|
22
|
+
|
|
23
|
+
[yarn](https://yarnpkg.com):
|
|
24
|
+
|
|
25
|
+
yarn add strftime
|
|
26
|
+
|
|
27
|
+
Or you can copy [strftime.js](https://github.com/samsonjs/strftime/blob/master/strftime.js) wherever you want to use it, whether that's with a <script> tag or `require` or anything else.
|
|
28
|
+
|
|
29
|
+
Changelog
|
|
30
|
+
=========
|
|
31
|
+
|
|
32
|
+
[View the changelog](https://github.com/samsonjs/strftime/blob/master/Changelog.md).
|
|
33
|
+
|
|
34
|
+
Usage
|
|
35
|
+
=====
|
|
36
|
+
|
|
37
|
+
```JavaScript
|
|
38
|
+
var strftime = require('strftime') // not required in browsers
|
|
39
|
+
console.log(strftime('%B %d, %Y %H:%M:%S')) // => April 28, 2011 18:21:08
|
|
40
|
+
console.log(strftime('%F %T', new Date(1307472705067))) // => 2011-06-07 18:51:45
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
If you want to localize it:
|
|
45
|
+
|
|
46
|
+
```JavaScript
|
|
47
|
+
var strftime = require('strftime') // not required in browsers
|
|
48
|
+
var it_IT = {
|
|
49
|
+
identifier: 'it-IT',
|
|
50
|
+
days: ['domenica', 'lunedi', 'martedi', 'mercoledi', 'giovedi', 'venerdi', 'sabato'],
|
|
51
|
+
shortDays: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'],
|
|
52
|
+
months: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],
|
|
53
|
+
shortMonths: ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'],
|
|
54
|
+
AM: 'AM',
|
|
55
|
+
PM: 'PM',
|
|
56
|
+
am: 'am',
|
|
57
|
+
pm: 'pm',
|
|
58
|
+
formats: {
|
|
59
|
+
D: '%m/%d/%y',
|
|
60
|
+
F: '%Y-%m-%d',
|
|
61
|
+
R: '%H:%M',
|
|
62
|
+
X: '%T',
|
|
63
|
+
c: '%a %b %d %X %Y',
|
|
64
|
+
r: '%I:%M:%S %p',
|
|
65
|
+
T: '%H:%M:%S',
|
|
66
|
+
v: '%e-%b-%Y',
|
|
67
|
+
x: '%D'
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
var strftimeIT = strftime.localize(it_IT)
|
|
71
|
+
console.log(strftimeIT('%B %d, %Y %H:%M:%S')) // => aprile 28, 2011 18:21:08
|
|
72
|
+
console.log(strftimeIT('%B %d, %Y %H:%M:%S', new Date(1307472705067))) // => giugno 7, 2011 18:51:45
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Some locales are bundled and can be used like so:
|
|
76
|
+
|
|
77
|
+
```JavaScript
|
|
78
|
+
var strftime = require('strftime') // not required in browsers
|
|
79
|
+
var strftimeIT = strftime.localizeByIdentifier('it_IT')
|
|
80
|
+
console.log(strftimeIT('%B %d, %Y %H:%M:%S')) // => aprile 28, 2011 18:21:08
|
|
81
|
+
console.log(strftimeIT('%B %d, %Y %H:%M:%S', new Date(1307472705067))) // => giugno 7, 2011 18:51:45
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
_The [full list of bundled locales](#locales) is below._
|
|
85
|
+
|
|
86
|
+
Time zones can be passed in as an offset from GMT in minutes.
|
|
87
|
+
|
|
88
|
+
```JavaScript
|
|
89
|
+
var strftime = require('strftime') // not required in browsers
|
|
90
|
+
var strftimePDT = strftime.timezone(-420)
|
|
91
|
+
var strftimeCEST = strftime.timezone(120)
|
|
92
|
+
console.log(strftimePDT('%B %d, %y %H:%M:%S', new Date(1307472705067))) // => June 07, 11 11:51:45
|
|
93
|
+
console.log(strftimeCEST('%F %T', new Date(1307472705067))) // => 2011-06-07 20:51:45
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Alternatively you can use the timezone format used by ISO 8601, `+HHMM` or `-HHMM`.
|
|
97
|
+
|
|
98
|
+
```JavaScript
|
|
99
|
+
var strftime = require('strftime') // not required in browsers
|
|
100
|
+
var strftimePDT = strftime.timezone('-0700')
|
|
101
|
+
var strftimeCEST = strftime.timezone('+0200')
|
|
102
|
+
console.log(strftimePDT('%F %T', new Date(1307472705067))) // => 2011-06-07 11:51:45
|
|
103
|
+
console.log(strftimeCEST('%F %T', new Date(1307472705067))) // => 2011-06-07 20:51:45
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Supported Specifiers
|
|
107
|
+
====================
|
|
108
|
+
|
|
109
|
+
Extensions from Ruby are noted in the following list.
|
|
110
|
+
|
|
111
|
+
Unsupported specifiers are rendered without the percent sign.
|
|
112
|
+
e.g. `%q` becomes `q`. Use `%%` to get a literal `%` sign.
|
|
113
|
+
|
|
114
|
+
- A: full weekday name
|
|
115
|
+
- a: abbreviated weekday name
|
|
116
|
+
- B: full month name
|
|
117
|
+
- b: abbreviated month name
|
|
118
|
+
- C: AD century (year / 100), padded to 2 digits
|
|
119
|
+
- c: equivalent to `%a %b %d %X %Y %Z` in en_US (based on locale)
|
|
120
|
+
- D: equivalent to `%m/%d/%y` in en_US (based on locale)
|
|
121
|
+
- d: day of the month, padded to 2 digits (01-31)
|
|
122
|
+
- e: day of the month, padded with a leading space for single digit values (1-31)
|
|
123
|
+
- F: equivalent to `%Y-%m-%d` in en_US (based on locale)
|
|
124
|
+
- H: the hour (24-hour clock), padded to 2 digits (00-23)
|
|
125
|
+
- h: the same as %b (abbreviated month name)
|
|
126
|
+
- I: the hour (12-hour clock), padded to 2 digits (01-12)
|
|
127
|
+
- j: day of the year, padded to 3 digits (001-366)
|
|
128
|
+
- k: the hour (24-hour clock), padded with a leading space for single digit values (0-23)
|
|
129
|
+
- L: the milliseconds, padded to 3 digits [Ruby extension]
|
|
130
|
+
- l: the hour (12-hour clock), padded with a leading space for single digit values (1-12)
|
|
131
|
+
- M: the minute, padded to 2 digits (00-59)
|
|
132
|
+
- m: the month, padded to 2 digits (01-12)
|
|
133
|
+
- n: newline character
|
|
134
|
+
- o: day of the month as an ordinal (without padding), e.g. 1st, 2nd, 3rd, 4th, ...
|
|
135
|
+
- P: "am" or "pm" in lowercase (Ruby extension, based on locale)
|
|
136
|
+
- p: "AM" or "PM" (based on locale)
|
|
137
|
+
- R: equivalent to `%H:%M` in en_US (based on locale)
|
|
138
|
+
- r: equivalent to `%I:%M:%S %p` in en_US (based on locale)
|
|
139
|
+
- S: the second, padded to 2 digits (00-60)
|
|
140
|
+
- s: the number of seconds since the Epoch, UTC
|
|
141
|
+
- T: equivalent to `%H:%M:%S` in en_US (based on locale)
|
|
142
|
+
- t: tab character
|
|
143
|
+
- U: week number of the year, Sunday as the first day of the week, padded to 2 digits (00-53)
|
|
144
|
+
- u: the weekday, Monday as the first day of the week (1-7)
|
|
145
|
+
- v: equivalent to `%e-%b-%Y` in en_US (based on locale)
|
|
146
|
+
- W: week number of the year, Monday as the first day of the week, padded to 2 digits (00-53)
|
|
147
|
+
- w: the weekday, Sunday as the first day of the week (0-6)
|
|
148
|
+
- X: equivalent to `%T` or `%r` in en_US (based on locale)
|
|
149
|
+
- x: equivalent to `%D` in en_US (based on locale)
|
|
150
|
+
- Y: the year with the century
|
|
151
|
+
- y: the year without the century, padded to 2 digits (00-99)
|
|
152
|
+
- Z: the time zone name, replaced with an empty string if it is not found
|
|
153
|
+
- z: the time zone offset from UTC, with a leading plus sign for UTC and zones east
|
|
154
|
+
of UTC and a minus sign for those west of UTC, hours and minutes follow each
|
|
155
|
+
padded to 2 digits and with no delimiter between them
|
|
156
|
+
|
|
157
|
+
For more detail see `man 3 strftime` as the format specifiers should behave identically. If behaviour differs please [file a bug](https://github.com/samsonjs/strftime/issues/new).
|
|
158
|
+
|
|
159
|
+
Any specifier can be modified with `-`, `_`, `0`, or `:` as well, as in Ruby. Using `%-` will omit any leading zeroes or spaces, `%_` will force spaces for padding instead of the default, and `%0` will force zeroes for padding. There's some redundancy here as `%-d` and `%e` have the same result, but it solves some awkwardness with formats like `%l`. Using `%:` for time zone offset, as in `%:z` will insert a colon as a delimiter.
|
|
160
|
+
|
|
161
|
+
<a name="locales"></a>
|
|
162
|
+
Bundled Locales
|
|
163
|
+
===============
|
|
164
|
+
|
|
165
|
+
- de\_DE
|
|
166
|
+
- en\_CA
|
|
167
|
+
- en\_US
|
|
168
|
+
- es\_MX
|
|
169
|
+
- fr\_FR
|
|
170
|
+
- it\_IT
|
|
171
|
+
- nl\_NL
|
|
172
|
+
- pt\_BR
|
|
173
|
+
- ru\_RU
|
|
174
|
+
- tr\_TR
|
|
175
|
+
- zh\_CN
|
|
176
|
+
|
|
177
|
+
Contributors
|
|
178
|
+
============
|
|
179
|
+
|
|
180
|
+
* [Alexandr Nikitin](https://github.com/alexandrnikitin)
|
|
181
|
+
* [Andrew Pirondini](https://github.com/andrewjpiro) of [iFixit](https://github.com/iFixit)
|
|
182
|
+
* [Andrew Schaaf](https://github.com/andrewschaaf)
|
|
183
|
+
* [Ayman Nedjmeddine](https://github.com/IOAyman)
|
|
184
|
+
* [Cory Heslip](https://github.com/cheslip)
|
|
185
|
+
* [Douglas de Espindola](https://github.com/douglasep)
|
|
186
|
+
* [Forbes Lindesay](https://github.com/ForbesLindesay)
|
|
187
|
+
* [John Zwinck](https://github.com/jzwinck)
|
|
188
|
+
* [Joost Hietbrink](https://github.com/joost)
|
|
189
|
+
* [Kevin Jin](https://github.com/Kevin-Jin)
|
|
190
|
+
* [Michael J.](https://github.com/michaeljayt)
|
|
191
|
+
* [Peter deHaan](https://github.com/pdehaan)
|
|
192
|
+
* [Rob Colburn](https://github.com/robcolburn)
|
|
193
|
+
* [Ryan Regalado](https://github.com/d48)
|
|
194
|
+
* [Ryan Stafford](https://github.com/ryanstafford)
|
|
195
|
+
* [Sami Samhuri](https://github.com/samsonjs)
|
|
196
|
+
* [Stian Grytøyr](https://github.com/stiang)
|
|
197
|
+
* [TJ Holowaychuk](https://github.com/tj)
|
|
198
|
+
* [w0den](https://github.com/w0den)
|
|
199
|
+
* [Yusuke Kawasaki](https://github.com/kawanet)
|
|
200
|
+
* [Aryan Arora](https://github.com/aryan-debug)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
License
|
|
204
|
+
=======
|
|
205
|
+
|
|
206
|
+
Copyright 2010 - 2023 Sami Samhuri sami@samhuri.net
|
|
207
|
+
|
|
208
|
+
[MIT license](https://sjs.mit-license.org)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "strftime",
|
|
3
|
+
"repo": "samsonjs/strftime",
|
|
4
|
+
"description": "strftime date formatting",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"strftime",
|
|
7
|
+
"format",
|
|
8
|
+
"date",
|
|
9
|
+
"time"
|
|
10
|
+
],
|
|
11
|
+
"version": "0.10.2",
|
|
12
|
+
"main": "strftime.js",
|
|
13
|
+
"scripts": [
|
|
14
|
+
"strftime.js"
|
|
15
|
+
]
|
|
16
|
+
}
|