Skip to content

Commit

Permalink
refactor(#21): reorganize project structure (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 6, 2023
1 parent 22ad687 commit 2106f9b
Show file tree
Hide file tree
Showing 340 changed files with 478 additions and 599 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ yarn-error.log*
.vercel

# es-iterator-helpers
packages/es-iterator-helpers/**/*.js
packages/manual/es-iterator-helpers/**/*.js
10 changes: 5 additions & 5 deletions create.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export const allPackages = ${JSON.stringify(allPackagesList, null, 2)};\n`;
`${JSON.stringify(newPackageJson, null, 2)}\n`
),
compareAndWriteFile(
path.join(__dirname, 'packages', 'cli', 'src', 'all-packages.ts'),
path.join(__dirname, 'packages/tools', 'cli', 'src', 'all-packages.ts'),
cliAllPackagesTs
),
compareAndWriteFile(
Expand All @@ -577,7 +577,7 @@ export const allPackages = ${JSON.stringify(allPackagesList, null, 2)};\n`;
* @param {string | null} [bindTo]
*/
async function createEsShimLikePackage(packageName, packageImplementation, isStatic, extraDependencies = {}, minimumNodeVersion = '>=12.4.0', bindTo = null) {
const packagePath = path.join(__dirname, 'packages', packageName);
const packagePath = path.join(__dirname, 'packages/generated', packageName);
await fsPromises.mkdir(
packagePath,
{ recursive: true }
Expand Down Expand Up @@ -624,7 +624,7 @@ async function createEsShimLikePackage(packageName, packageImplementation, isSta
repository: {
type: 'git',
url: 'https://github.com/SukkaW/nolyfill',
directory: `packages/${packageName}`
directory: `packages/generated/${packageName}`
},
main: './index.js',
license: 'MIT',
Expand All @@ -651,7 +651,7 @@ async function createEsShimLikePackage(packageName, packageImplementation, isSta
* @param {string} [minimumNodeVersion]
*/
async function createSingleFilePackage(packageName, implementation, extraDependencies = {}, minimumNodeVersion = '>=12.4.0') {
const packagePath = path.join(__dirname, 'packages', packageName);
const packagePath = path.join(__dirname, 'packages/generated', packageName);
await fsPromises.mkdir(
packagePath,
{ recursive: true }
Expand All @@ -670,7 +670,7 @@ async function createSingleFilePackage(packageName, implementation, extraDepende
repository: {
type: 'git',
url: 'https://github.com/SukkaW/nolyfill',
directory: `packages/${packageName}`
directory: `packages/generated/${packageName}`
},
main: './index.js',
license: 'MIT',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array-buffer-byte-length"
"directory": "packages/generated/array-buffer-byte-length"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array-includes"
"directory": "packages/generated/array-includes"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.from"
"directory": "packages/generated/array.from"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.at"
"directory": "packages/generated/array.prototype.at"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.find"
"directory": "packages/generated/array.prototype.find"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.findlast"
"directory": "packages/generated/array.prototype.findlast"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.findlastindex"
"directory": "packages/generated/array.prototype.findlastindex"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.flat"
"directory": "packages/generated/array.prototype.flat"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.flatmap"
"directory": "packages/generated/array.prototype.flatmap"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.reduce"
"directory": "packages/generated/array.prototype.reduce"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/array.prototype.tosorted"
"directory": "packages/generated/array.prototype.tosorted"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/arraybuffer.prototype.slice"
"directory": "packages/generated/arraybuffer.prototype.slice"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/asynciterator.prototype"
"directory": "packages/generated/asynciterator.prototype"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/available-typed-arrays"
"directory": "packages/generated/available-typed-arrays"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/deep-equal"
"directory": "packages/generated/deep-equal"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/define-properties"
"directory": "packages/generated/define-properties"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/es-aggregate-error"
"directory": "packages/generated/es-aggregate-error"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/es-set-tostringtag"
"directory": "packages/generated/es-set-tostringtag"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/function.prototype.name"
"directory": "packages/generated/function.prototype.name"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/get-symbol-description"
"directory": "packages/generated/get-symbol-description"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/gopd"
"directory": "packages/generated/gopd"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/harmony-reflect"
"directory": "packages/generated/harmony-reflect"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/has-property-descriptors"
"directory": "packages/generated/has-property-descriptors"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/has-proto"
"directory": "packages/generated/has-proto"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/has"
"directory": "packages/generated/has"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/internal-slot"
"directory": "packages/generated/internal-slot"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-arguments"
"directory": "packages/generated/is-arguments"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-array-buffer"
"directory": "packages/generated/is-array-buffer"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-date-object"
"directory": "packages/generated/is-date-object"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-generator-function"
"directory": "packages/generated/is-generator-function"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-regex"
"directory": "packages/generated/is-regex"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-shared-array-buffer"
"directory": "packages/generated/is-shared-array-buffer"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-string"
"directory": "packages/generated/is-string"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-symbol"
"directory": "packages/generated/is-symbol"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/is-weakref"
"directory": "packages/generated/is-weakref"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/iterator.prototype"
"directory": "packages/generated/iterator.prototype"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/object-is"
"directory": "packages/generated/object-is"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": {
"type": "git",
"url": "https://github.com/SukkaW/nolyfill",
"directory": "packages/object-keys"
"directory": "packages/generated/object-keys"
},
"main": "./index.js",
"license": "MIT",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 2106f9b

Please sign in to comment.