Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bevry/ecmascript-versions

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bevry/ecmascript-versions - npm Package Compare versions

Comparing version 3.6.0 to 4.0.0

edition-es2022-esm/index.js

20

edition-deno/index.ts

@@ -104,3 +104,3 @@ /**

a: ESVersionInformation,
b: ESVersionInformation,
b: ESVersionInformation
): number {

@@ -113,7 +113,7 @@ return a.ratified.getTime() - b.ratified.getTime()

a: ESVersionIdentifier,
b: ESVersionIdentifier,
b: ESVersionIdentifier
): number {
return compareESVersionInformation(
getESVersionInformationByVersion(a),
getESVersionInformationByVersion(b),
getESVersionInformationByVersion(b)
)

@@ -129,3 +129,3 @@ }

export function sortESVersionInformation(
versions: Array<ESVersionInformation>,
versions: Array<ESVersionInformation>
) {

@@ -140,3 +140,3 @@ return versions.sort(compareESVersionInformation)

export function getESVersionInformationByVersion(
version: ESVersionIdentifier,
version: ESVersionIdentifier
): ESVersionInformation {

@@ -152,3 +152,3 @@ if (esVersionsByVersion.has(version)) return esVersionsByVersion.get(version)!

export function getESVersionsInformationByVersion(
versions: Array<ESVersionIdentifier>,
versions: Array<ESVersionIdentifier>
): Array<ESVersionInformation> {

@@ -168,7 +168,7 @@ return versions

export function getESVersionsInformationByDate(
when: Date,
when: Date
): Array<ESVersionInformation> {
const time = when.getTime()
const results = esVersionList.filter(
(meta) => time >= meta.ratified.getTime(),
(meta) => time >= meta.ratified.getTime()
)

@@ -189,3 +189,3 @@ if (results.length) return results

export function getESVersionInformationByDate(
when: Date,
when: Date
): ESVersionInformation {

@@ -234,3 +234,3 @@ return getESVersionsInformationByDate(when).slice(-1)[0]

export function getESVersionInformationByEdition(
edition: Number,
edition: Number
): ESVersionInformation {

@@ -237,0 +237,0 @@ const meta = esVersionsByEdition.get(edition)

{
"name": "@bevry/ecmascript-versions",
"version": "3.6.0",
"version": "4.0.0",
"description": "Get all ECMAScript versions, or the ECMAScript version that was ratified on a specific date.",

@@ -11,5 +11,10 @@ "homepage": "https://github.com/bevry/ecmascript-versions",

"date",
"deno",
"deno-edition",
"deno-entry",
"denoland",
"ecmascript",
"es",
"es2017",
"es2022",
"es5",
"fetch",

@@ -77,3 +82,3 @@ "filter",

"engines": {
"node": ">=10"
"node": ">=4"
},

@@ -107,4 +112,4 @@ "editions": [

{
"description": "TypeScript compiled against ES2017 for Node.js with Require for modules",
"directory": "edition-es2017",
"description": "TypeScript compiled against ES2022 for Node.js 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules",
"directory": "edition-es2022",
"entry": "index.js",

@@ -114,7 +119,7 @@ "tags": [

"javascript",
"es2017",
"es2022",
"require"
],
"engines": {
"node": "10 || 12 || 14 || 16 || 18 || 20 || 21",
"node": "6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21",
"browsers": false

@@ -124,4 +129,4 @@ }

{
"description": "TypeScript compiled against ES2017 for Node.js with Import for modules",
"directory": "edition-es2017-esm",
"description": "TypeScript compiled against ES5 for Node.js 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with Require for modules",
"directory": "edition-es5",
"entry": "index.js",

@@ -131,3 +136,18 @@ "tags": [

"javascript",
"es2017",
"es5",
"require"
],
"engines": {
"node": "4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21",
"browsers": false
}
},
{
"description": "TypeScript compiled against ES2022 for Node.js 12 || 14 || 16 || 18 || 20 || 21 with Import for modules",
"directory": "edition-es2022-esm",
"entry": "index.js",
"tags": [
"compiled",
"javascript",
"es2022",
"import"

@@ -139,2 +159,16 @@ ],

}
},
{
"description": "TypeScript source code made to be compatible with Deno",
"directory": "edition-deno",
"entry": "index.ts",
"tags": [
"typescript",
"import",
"deno"
],
"engines": {
"deno": true,
"browsers": true
}
}

@@ -144,7 +178,8 @@ ],

"type": "module",
"main": "edition-es2017/index.js",
"main": "index.cjs",
"exports": {
"node": {
"import": "./edition-es2017-esm/index.js",
"require": "./edition-es2017/index.js"
"import": "./edition-es2022-esm/index.js",
"default": "./index.cjs",
"require": "./edition-es2022/index.js"
},

@@ -155,17 +190,21 @@ "browser": {

},
"deno": "edition-deno/index.ts",
"browser": "edition-browsers/index.js",
"module": "edition-browsers/index.js",
"dependencies": {
"editions": "^6.11.0"
},
"devDependencies": {
"@bevry/update-contributors": "^1.22.0",
"@types/node": "^20.8.10",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"assert-helpers": "^8.4.0",
"eslint": "^8.52.0",
"eslint-config-bevry": "^3.27.0",
"@bevry/update-contributors": "^1.23.0",
"@types/node": "^20.9.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"assert-helpers": "^11.2.0",
"eslint": "^8.53.0",
"eslint-config-bevry": "^3.29.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"kava": "^5.15.0",
"kava": "^7.1.0",
"make-deno-edition": "^1.3.0",
"prettier": "^3.0.3",
"prettier": "^3.1.0",
"projectz": "^2.23.0",

@@ -175,13 +214,14 @@ "surge": "^0.23.1",

"typescript": "5.2.2",
"valid-directory": "^4.0.0",
"valid-module": "^1.17.0"
"valid-directory": "^4.1.0",
"valid-module": "^2.1.0"
},
"scripts": {
"our:clean": "rm -Rf ./docs ./edition* ./es2015 ./es5 ./out ./.next",
"our:compile": "npm run our:compile:deno && npm run our:compile:edition-browsers && npm run our:compile:edition-es2017 && npm run our:compile:edition-es2017-esm && npm run our:compile:types",
"our:clean": "rm -rf ./docs ./edition* ./es2015 ./es5 ./out ./.next",
"our:compile": "npm run our:compile:deno && npm run our:compile:edition-browsers && npm run our:compile:edition-es2022 && npm run our:compile:edition-es2022-esm && npm run our:compile:edition-es5 && npm run our:compile:types",
"our:compile:deno": "make-deno-edition --attempt",
"our:compile:edition-browsers": "tsc --module ESNext --target ES2022 --outDir ./edition-browsers --project tsconfig.json && ( test ! -d edition-browsers/source || ( mv edition-browsers/source edition-temp && rm -Rf edition-browsers && mv edition-temp edition-browsers ) )",
"our:compile:edition-es2017": "tsc --module commonjs --target ES2017 --outDir ./edition-es2017 --project tsconfig.json && ( test ! -d edition-es2017/source || ( mv edition-es2017/source edition-temp && rm -Rf edition-es2017 && mv edition-temp edition-es2017 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2017/package.json",
"our:compile:edition-es2017-esm": "tsc --module ESNext --target ES2017 --outDir ./edition-es2017-esm --project tsconfig.json && ( test ! -d edition-es2017-esm/source || ( mv edition-es2017-esm/source edition-temp && rm -Rf edition-es2017-esm && mv edition-temp edition-es2017-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2017-esm/package.json",
"our:compile:types": "tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -Rf compiled-types && mv edition-temp compiled-types ) )",
"our:compile:edition-browsers": "tsc --module ESNext --target ES2022 --outDir ./edition-browsers --project tsconfig.json && ( test ! -d edition-browsers/source || ( mv edition-browsers/source edition-temp && rm -rf edition-browsers && mv edition-temp edition-browsers ) )",
"our:compile:edition-es2022": "tsc --module commonjs --target ES2022 --outDir ./edition-es2022 --project tsconfig.json && ( test ! -d edition-es2022/source || ( mv edition-es2022/source edition-temp && rm -rf edition-es2022 && mv edition-temp edition-es2022 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es2022/package.json",
"our:compile:edition-es2022-esm": "tsc --module ESNext --target ES2022 --outDir ./edition-es2022-esm --project tsconfig.json && ( test ! -d edition-es2022-esm/source || ( mv edition-es2022-esm/source edition-temp && rm -rf edition-es2022-esm && mv edition-temp edition-es2022-esm ) ) && printf '%s' '{\"type\": \"module\"}' > edition-es2022-esm/package.json",
"our:compile:edition-es5": "tsc --module commonjs --target ES5 --outDir ./edition-es5 --project tsconfig.json && ( test ! -d edition-es5/source || ( mv edition-es5/source edition-temp && rm -rf edition-es5 && mv edition-temp edition-es5 ) ) && printf '%s' '{\"type\": \"commonjs\"}' > edition-es5/package.json",
"our:compile:types": "tsc --project tsconfig.json --emitDeclarationOnly --declaration --declarationMap --declarationDir ./compiled-types && ( test ! -d compiled-types/source || ( mv compiled-types/source edition-temp && rm -rf compiled-types && mv edition-temp compiled-types ) )",
"our:deploy": "printf '%s\n' 'no need for this project'",

@@ -191,3 +231,3 @@ "our:meta": "npm run our:meta:contributors && npm run our:meta:docs && npm run our:meta:projectz",

"our:meta:docs": "npm run our:meta:docs:typedoc",
"our:meta:docs:typedoc": "rm -Rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source",
"our:meta:docs:typedoc": "rm -rf ./docs && typedoc --exclude '**/+(*test*|node_modules)' --excludeExternals --out ./docs ./source",
"our:meta:projectz": "projectz compile",

@@ -208,3 +248,3 @@ "our:release": "npm run our:release:prepare && npm run our:release:check-changelog && npm run our:release:check-dirty && npm run our:release:tag && npm run our:release:push",

"our:verify:prettier": "prettier --write .",
"test": "node ./edition-es2017/test.js"
"test": "node ./test.cjs"
},

@@ -218,4 +258,5 @@ "eslintConfig": {

"semi": false,
"singleQuote": true
"singleQuote": true,
"trailingComma": "es5"
}
}

@@ -86,2 +86,8 @@ <!-- TITLE/ -->

<a href="https://deno.land" title="Deno is a secure runtime for JavaScript and TypeScript, it is an alternative for Node.js"><h3>Deno</h3></a>
``` typescript
import * as pkg from 'https://unpkg.com/@bevry/ecmascript-versions@^4.0.0/edition-deno/index.ts'
```
<a href="https://www.skypack.dev" title="Skypack is a JavaScript Delivery Network for modern web apps"><h3>Skypack</h3></a>

@@ -91,3 +97,3 @@

<script type="module">
import * as pkg from '//cdn.skypack.dev/@bevry/ecmascript-versions@^3.6.0'
import * as pkg from '//cdn.skypack.dev/@bevry/ecmascript-versions@^4.0.0'
</script>

@@ -100,3 +106,3 @@ ```

<script type="module">
import * as pkg from '//unpkg.com/@bevry/ecmascript-versions@^3.6.0'
import * as pkg from '//unpkg.com/@bevry/ecmascript-versions@^4.0.0'
</script>

@@ -109,3 +115,3 @@ ```

<script type="module">
import * as pkg from '//dev.jspm.io/@bevry/ecmascript-versions@3.6.0'
import * as pkg from '//dev.jspm.io/@bevry/ecmascript-versions@4.0.0'
</script>

@@ -118,7 +124,9 @@ ```

<ul><li><code>@bevry/ecmascript-versions/source/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<ul><li><code>@bevry/ecmascript-versions</code> aliases <code>@bevry/ecmascript-versions/index.cjs</code> which uses the <a href="https://github.com/bevry/editions" title="You can use the Editions Autoloader to autoload the appropriate edition for your consumers environment">Editions Autoloader</a> to automatically select the correct edition for the consumer's environment</li>
<li><code>@bevry/ecmascript-versions/source/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>@bevry/ecmascript-versions/edition-browsers/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES2022 for web browsers with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>@bevry/ecmascript-versions</code> aliases <code>@bevry/ecmascript-versions/edition-es2017/index.js</code></li>
<li><code>@bevry/ecmascript-versions/edition-es2017/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017" title="ECMAScript ES2017">ES2017</a> for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li>
<li><code>@bevry/ecmascript-versions/edition-es2017-esm/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against <a href="https://en.wikipedia.org/wiki/ECMAScript#8th_Edition_-_ECMAScript_2017" title="ECMAScript ES2017">ES2017</a> for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li></ul>
<li><code>@bevry/ecmascript-versions/edition-es2022/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES2022 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li>
<li><code>@bevry/ecmascript-versions/edition-es5/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES5 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> 4 || 6 || 8 || 10 || 12 || 14 || 16 || 18 || 20 || 21 with <a href="https://nodejs.org/dist/latest-v5.x/docs/api/modules.html" title="Node/CJS Modules">Require</a> for modules</li>
<li><code>@bevry/ecmascript-versions/edition-es2022-esm/index.js</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> compiled against ES2022 for <a href="https://nodejs.org" title="Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine">Node.js</a> 12 || 14 || 16 || 18 || 20 || 21 with <a href="https://babeljs.io/docs/learn-es2015/#modules" title="ECMAScript Modules">Import</a> for modules</li>
<li><code>@bevry/ecmascript-versions/edition-deno/index.ts</code> is <a href="https://www.typescriptlang.org/" title="TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. ">TypeScript</a> source code made to be compatible with <a href="https://deno.land" title="Deno is a secure runtime for JavaScript and TypeScript, it is an alternative to Node.js">Deno</a></li></ul>

@@ -125,0 +133,0 @@ <!-- /INSTALL -->

@@ -104,3 +104,3 @@ /**

a: ESVersionInformation,
b: ESVersionInformation,
b: ESVersionInformation
): number {

@@ -113,7 +113,7 @@ return a.ratified.getTime() - b.ratified.getTime()

a: ESVersionIdentifier,
b: ESVersionIdentifier,
b: ESVersionIdentifier
): number {
return compareESVersionInformation(
getESVersionInformationByVersion(a),
getESVersionInformationByVersion(b),
getESVersionInformationByVersion(b)
)

@@ -129,3 +129,3 @@ }

export function sortESVersionInformation(
versions: Array<ESVersionInformation>,
versions: Array<ESVersionInformation>
) {

@@ -140,3 +140,3 @@ return versions.sort(compareESVersionInformation)

export function getESVersionInformationByVersion(
version: ESVersionIdentifier,
version: ESVersionIdentifier
): ESVersionInformation {

@@ -152,3 +152,3 @@ if (esVersionsByVersion.has(version)) return esVersionsByVersion.get(version)!

export function getESVersionsInformationByVersion(
versions: Array<ESVersionIdentifier>,
versions: Array<ESVersionIdentifier>
): Array<ESVersionInformation> {

@@ -168,7 +168,7 @@ return versions

export function getESVersionsInformationByDate(
when: Date,
when: Date
): Array<ESVersionInformation> {
const time = when.getTime()
const results = esVersionList.filter(
(meta) => time >= meta.ratified.getTime(),
(meta) => time >= meta.ratified.getTime()
)

@@ -189,3 +189,3 @@ if (results.length) return results

export function getESVersionInformationByDate(
when: Date,
when: Date
): ESVersionInformation {

@@ -234,3 +234,3 @@ return getESVersionsInformationByDate(when).slice(-1)[0]

export function getESVersionInformationByEdition(
edition: Number,
edition: Number
): ESVersionInformation {

@@ -237,0 +237,0 @@ const meta = esVersionsByEdition.get(edition)

@@ -9,3 +9,3 @@ {

"strict": true,
"target": "ES2017",
"target": "ES2022",
"module": "ESNext"

@@ -12,0 +12,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc