mirror of
https://github.com/xfarrow/blink
synced 2025-06-27 09:03:02 +02:00
Change endpoint from persons to people
This commit is contained in:
3
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/.github/FUNDING.yml
generated
vendored
Normal file
3
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/.github/FUNDING.yml
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [nicolo-ribaudo]
|
49
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/.github/workflows/nodejs.yml
generated
vendored
Normal file
49
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/.github/workflows/nodejs.yml
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: Node.js CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version:
|
||||
[
|
||||
"10.0",
|
||||
"10.19",
|
||||
"12.4",
|
||||
"12.8",
|
||||
"13.11",
|
||||
"14.3",
|
||||
"14",
|
||||
"15",
|
||||
"16.10",
|
||||
"16.11",
|
||||
"17",
|
||||
"18.19",
|
||||
"18.20",
|
||||
"19",
|
||||
"20.9",
|
||||
"20.10",
|
||||
"21",
|
||||
"22",
|
||||
]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js latest
|
||||
uses: actions/setup-node@v1
|
||||
- run: npm install
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- run: npm test
|
22
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/LICENSE
generated
vendored
Normal file
22
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Nicolò Ribaudo and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
30
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/README.md
generated
vendored
Normal file
30
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/README.md
generated
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
# `babel-preset-current-node-syntax`
|
||||
|
||||
> A Babel preset that enables parsing of proposals supported by the current Node.js version.
|
||||
|
||||
## Installation
|
||||
|
||||
If you are using yarn:
|
||||
```
|
||||
yarn add --dev babel-preset-current-node-syntax
|
||||
```
|
||||
|
||||
If you are using npm:
|
||||
```
|
||||
npm install --save-dev babel-preset-current-node-syntax
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
PRs are welcome! The codebase is so small that I didn't setup a linter, but try
|
||||
to match the style of the existing code.
|
||||
|
||||
You can run tests with the following command:
|
||||
```
|
||||
yarn node test/index.js
|
||||
```
|
||||
|
||||
The `test/fixtures.json` file contains a bunch of syntax tests, alongside with
|
||||
the minimum supported node version for each of them. Babel should throw on
|
||||
older versions, without support for that given syntax.
|
||||
All the tests are run using `@babel/parser@7.0.0`.
|
45
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/package.json
generated
vendored
Normal file
45
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/package.json
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"name": "babel-preset-current-node-syntax",
|
||||
"version": "1.1.0",
|
||||
"description": "A Babel preset that enables parsing of proposals supported by the current Node.js version.",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax.git"
|
||||
},
|
||||
"author": {
|
||||
"name": "Nicolò Ribaudo",
|
||||
"url": "https://github.com/nicolo-ribaudo"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node ./test/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-syntax-async-generators": "^7.8.4",
|
||||
"@babel/plugin-syntax-bigint": "^7.8.3",
|
||||
"@babel/plugin-syntax-class-properties": "^7.12.13",
|
||||
"@babel/plugin-syntax-class-static-block": "^7.14.5",
|
||||
"@babel/plugin-syntax-import-attributes": "^7.24.7",
|
||||
"@babel/plugin-syntax-import-meta": "^7.10.4",
|
||||
"@babel/plugin-syntax-json-strings": "^7.8.3",
|
||||
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
|
||||
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
|
||||
"@babel/plugin-syntax-numeric-separator": "^7.10.4",
|
||||
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
|
||||
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
||||
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
|
||||
"@babel/plugin-syntax-private-property-in-object": "^7.14.5",
|
||||
"@babel/plugin-syntax-top-level-await": "^7.14.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.25.2",
|
||||
"@babel/parser-7.0.0": "npm:@babel/parser@7.0.0",
|
||||
"@babel/parser-7.12.0": "npm:@babel/parser@7.12.0",
|
||||
"@babel/parser-7.22.0": "npm:@babel/parser@7.22.0",
|
||||
"@babel/parser-7.9.0": "npm:@babel/parser@7.9.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
72
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/src/index.js
generated
vendored
Normal file
72
backend/apis/nodejs/node_modules/babel-preset-current-node-syntax/src/index.js
generated
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
const tests = {
|
||||
// ECMAScript 2018
|
||||
"object-rest-spread": ["({ ...{} })", "({ ...x } = {})"], // Babel 7.2.0
|
||||
"async-generators": ["async function* f() {}"], // Babel 7.2.0
|
||||
|
||||
// ECMAScript 2019
|
||||
"optional-catch-binding": ["try {} catch {}"], // Babel 7.2.0
|
||||
"json-strings": ["'\\u2028'"], // Babel 7.2.0
|
||||
|
||||
// ECMAScript 2020
|
||||
bigint: ["1n"], // Babel 7.8.0
|
||||
"optional-chaining": ["a?.b"], // Babel 7.9.0
|
||||
"nullish-coalescing-operator": ["a ?? b"], // Babel 7.9.0
|
||||
// import.meta is handled manually
|
||||
|
||||
// ECMAScript 2021
|
||||
"numeric-separator": ["1_2"],
|
||||
"logical-assignment-operators": ["a ||= b", "a &&= b", "a ??= c"],
|
||||
|
||||
// ECMAScript 2022
|
||||
"class-properties": [
|
||||
"(class { x = 1 })",
|
||||
"(class { #x = 1 })",
|
||||
"(class { #x() {} })",
|
||||
],
|
||||
"private-property-in-object": ["(class { #x; m() { #x in y } })"],
|
||||
"class-static-block": ["(class { static {} })"],
|
||||
// top-level await is handled manually
|
||||
|
||||
// Stage 3
|
||||
// import attributes is handled manually
|
||||
};
|
||||
|
||||
const plugins = [];
|
||||
const works = (test) => {
|
||||
try {
|
||||
// Wrap the test in a function to only test the syntax, without executing it
|
||||
(0, eval)(`(() => { ${test} })`);
|
||||
return true;
|
||||
} catch (_error) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
for (const [name, cases] of Object.entries(tests)) {
|
||||
if (cases.some(works)) {
|
||||
plugins.push(require.resolve(`@babel/plugin-syntax-${name}`));
|
||||
}
|
||||
}
|
||||
|
||||
// import.meta is only allowed in modules, and modules can only be evaluated
|
||||
// synchronously. For this reason, we cannot detect import.meta support at
|
||||
// runtime. It is supported starting from 10.4, so we can check the version.
|
||||
const major = parseInt(process.versions.node, 10);
|
||||
const minor = parseInt(process.versions.node.match(/^\d+\.(\d+)/)[1], 10);
|
||||
if (major > 10 || (major === 10 && minor >= 4)) {
|
||||
plugins.push(require.resolve("@babel/plugin-syntax-import-meta"));
|
||||
}
|
||||
// Same for top level await - it is only supported in modules. It is supported
|
||||
// from 14.3.0
|
||||
if (major > 14 || (major === 14 && minor >= 3)) {
|
||||
plugins.push(require.resolve("@babel/plugin-syntax-top-level-await"));
|
||||
}
|
||||
// Similar for import attributes
|
||||
if (
|
||||
major > 20 ||
|
||||
(major === 20 && minor >= 10) ||
|
||||
(major === 18 && minor >= 20)
|
||||
) {
|
||||
plugins.push(require.resolve("@babel/plugin-syntax-import-attributes"));
|
||||
}
|
||||
module.exports = () => ({ plugins });
|
Reference in New Issue
Block a user