refactor(bindingins): Create @swc/counter (#7991)

This commit is contained in:
Donny/강동윤 2023-09-23 08:48:27 +09:00 committed by GitHub
parent 276be28ae1
commit 0acbb5f78d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 201 additions and 155 deletions

View File

@ -66,6 +66,9 @@
"*.rs": [
"rustfmt --"
],
"*.json": [
"prettier --write"
],
"!(**/tests/**/*)*.js": [
"prettier --write"
],
@ -178,6 +181,7 @@
],
"packageManager": "yarn@3.5.0",
"dependencies": {
"@swc/types": "^0.1.4"
"@swc/counter": "^0.1.1",
"@swc/types": "^0.1.5"
}
}

View File

@ -0,0 +1,3 @@
# @swc/couter
Download counter for swc packages.

View File

@ -0,0 +1 @@
console.log('download-counter/index.js');

View File

@ -0,0 +1,28 @@
{
"name": "@swc/counter",
"packageManager": "yarn@3.2.3",
"main": "index.js",
"version": "0.1.1",
"description": "Downloade counter for the swc project",
"sideEffects": false,
"repository": {
"type": "git",
"url": "git+https://github.com/swc-project/swc.git"
},
"scripts": {},
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
"keywords": [
"swc",
"download",
"counter"
],
"author": "강동윤 <kdy1997.dev@gmail.com>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/swc-project/swc/issues"
},
"homepage": "https://swc.rs"
}

View File

@ -14,14 +14,8 @@
"json": {
"indentWidth": 4
},
"includes": [
"{esm,cjs,src}/*.{js,mjs,cjs}",
"**/*.json"
],
"excludes": [
"**/node_modules",
"**/*-lock.json"
],
"includes": ["{esm,cjs,src}/*.{js,mjs,cjs}", "**/*.json"],
"excludes": ["**/node_modules", "**/*-lock.json"],
"plugins": [
"https://plugins.dprint.dev/typescript-0.84.0.wasm",
"https://plugins.dprint.dev/json-0.17.1.wasm"

View File

@ -1,5 +1,6 @@
{
"name": "@swc/helpers",
"packageManager": "yarn@3.2.3",
"version": "0.5.2",
"description": "External helpers for the swc project.",
"module": "esm/index.js",

View File

@ -8,13 +8,7 @@
"binaryExpression.linePerExpression": true,
"memberExpression.linePerExpression": true
},
"includes": [
"*.js"
],
"excludes": [
"**/node_modules"
],
"plugins": [
"https://plugins.dprint.dev/typescript-0.84.0.wasm"
]
"includes": ["*.js"],
"excludes": ["**/node_modules"],
"plugins": ["https://plugins.dprint.dev/typescript-0.84.0.wasm"]
}

View File

@ -1,8 +1,11 @@
{
"name": "@swc/workspace",
"packageManager": "yarn@3.2.3",
"private": true,
"workspaces": [
"./*"
],
"packageManager": "yarn@3.2.3"
"devDependencies": {
"prettier": "^3.0.3"
}
}

View File

@ -15,11 +15,6 @@
"skipLibCheck": true,
"rootDir": "."
},
"include": [
"lib",
"tests"
],
"exclude": [
"examples"
]
"include": ["lib", "tests"],
"exclude": ["examples"]
}

View File

@ -317,7 +317,7 @@ export interface TerserMangleOptions {
reserved?: string[];
}
export interface TerserManglePropertiesOptions { }
export interface TerserManglePropertiesOptions {}
/**
* Programmatic options.
@ -602,14 +602,12 @@ export interface JscConfig {
*/
keepImportAttributes?: boolean;
/**
* Use `assert` instead of `with` for imports and exports.
* This option only works when `keepImportAttributes` is `true`.
*/
emitAssertForImportAttributes?: boolean;
/**
* Specify the location where SWC stores its intermediate cache files.
* Currently only transform plugin uses this. If not specified, SWC will
@ -1087,7 +1085,7 @@ export interface Output {
map?: string;
}
export interface MatchPattern { }
export interface MatchPattern {}
// -------------------------------
// ---------- Ast nodes ----------
@ -1319,7 +1317,7 @@ export type Expression =
| OptionalChainingExpression
| Invalid;
interface ExpressionBase extends Node, HasSpan { }
interface ExpressionBase extends Node, HasSpan {}
export interface Identifier extends ExpressionBase {
type: "Identifier";

View File

@ -1,5 +1,6 @@
{
"name": "@swc/types",
"packageManager": "yarn@3.2.3",
"version": "0.1.5",
"description": "Typings for the swc project.",
"sideEffects": false,
@ -26,7 +27,6 @@
"url": "https://github.com/swc-project/swc/issues"
},
"homepage": "https://swc.rs",
"packageManager": "yarn@3.2.3",
"devDependencies": {
"typescript": "^5.2.2"
}

View File

@ -9,7 +9,7 @@
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
/* Language and Environment */
"target": "esnext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"target": "esnext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
@ -22,7 +22,7 @@
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
/* Modules */
"module": "commonjs", /* Specify what module code is generated. */
"module": "commonjs" /* Specify what module code is generated. */,
// "rootDir": "./", /* Specify the root folder within your source files. */
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
@ -44,8 +44,8 @@
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
/* Emit */
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"declarationMap": true, /* Create sourcemaps for d.ts files. */
"declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
"declarationMap": true /* Create sourcemaps for d.ts files. */,
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
@ -71,11 +71,11 @@
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
/* Type Checking */
"strict": true, /* Enable all strict type-checking options. */
"strict": true /* Enable all strict type-checking options. */,
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@ -96,7 +96,7 @@
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true,
"skipLibCheck": true
// "noEmit": true
}
}

View File

@ -108,6 +108,12 @@ __metadata:
languageName: node
linkType: hard
"@swc/download-counter@workspace:download-counter":
version: 0.0.0-use.local
resolution: "@swc/download-counter@workspace:download-counter"
languageName: unknown
linkType: soft
"@swc/helpers@workspace:helpers":
version: 0.0.0-use.local
resolution: "@swc/helpers@workspace:helpers"
@ -131,6 +137,8 @@ __metadata:
"@swc/workspace@workspace:.":
version: 0.0.0-use.local
resolution: "@swc/workspace@workspace:."
dependencies:
prettier: ^3.0.3
languageName: unknown
linkType: soft
@ -552,6 +560,15 @@ __metadata:
languageName: node
linkType: hard
"prettier@npm:^3.0.3":
version: 3.0.3
resolution: "prettier@npm:3.0.3"
bin:
prettier: bin/prettier.cjs
checksum: e10b9af02b281f6c617362ebd2571b1d7fc9fb8a3bd17e371754428cda992e5e8d8b7a046e8f7d3e2da1dcd21aa001e2e3c797402ebb6111b5cd19609dd228e0
languageName: node
linkType: hard
"ps-tree@npm:^1.2.0":
version: 1.2.0
resolution: "ps-tree@npm:1.2.0"

View File

@ -2562,9 +2562,10 @@ __metadata:
"@swc/core-win32-arm64-msvc": 1.2.146
"@swc/core-win32-ia32-msvc": 1.2.146
"@swc/core-win32-x64-msvc": 1.2.146
"@swc/counter": ^0.1.1
"@swc/helpers": ^0.5.0
"@swc/plugin-jest": latest
"@swc/types": ^0.1.4
"@swc/types": ^0.1.5
"@taplo/cli": ^0.3.2
"@types/jest": ^28.1.4
"@types/node": ^20.5.0
@ -2631,6 +2632,13 @@ __metadata:
languageName: unknown
linkType: soft
"@swc/counter@npm:^0.1.1":
version: 0.1.1
resolution: "@swc/counter@npm:0.1.1"
checksum: bb974babd493ba01c0d4a95ab610c3fc15fbf609c08cb0342798e485f57ecc0950abbf84e07124e63c5fe610b492d9a8dd03701d3b9ef7329d9e8bf3cc44980f
languageName: node
linkType: hard
"@swc/helpers@npm:^0.5.0":
version: 0.5.1
resolution: "@swc/helpers@npm:0.5.1"
@ -2647,10 +2655,10 @@ __metadata:
languageName: node
linkType: hard
"@swc/types@npm:^0.1.4":
version: 0.1.4
resolution: "@swc/types@npm:0.1.4"
checksum: 9b09de7dca8e4b19bfb43f9e332c771855158cb761d26000807fe858447ecbc5342a6c257b26d9aa5497f7138fc58913693e2bee222e5042e0e8f57c2979ae66
"@swc/types@npm:^0.1.5":
version: 0.1.5
resolution: "@swc/types@npm:0.1.5"
checksum: 6aee11f62d3d805a64848e0bd5f0e0e615f958e327a9e1260056c368d7d28764d89e38bd8005a536c9bf18afbcd303edd84099d60df34a2975d62540f61df13b
languageName: node
linkType: hard