Skip to content

Commit

Permalink
fix: #663 - Update globby to 10.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret committed Jul 13, 2019
1 parent 741ce00 commit 07f3417
Show file tree
Hide file tree
Showing 4 changed files with 903 additions and 489 deletions.
93 changes: 47 additions & 46 deletions package.json
Expand Up @@ -10,32 +10,32 @@
"lint:src": "tslint \"src/**/*.ts\"",
"lint:scripts": "tslint \"scripts/**/*.ts\"",
"lint:src-and-fix": "tslint \"src/**/*.ts\" --fix",
"build": "rimraf dist && npx ttsc && ts-node --transpileOnly scripts/build/removeEmptyFiles",
"build:declarations": "rimraf dist-declarations && ts-node --max-old-space-size=8192 --transpileOnly scripts/generation/main create-code-block-writer-file create-declaration-file",
"build": "rimraf dist && npx ttsc && ts-node --transpile-only scripts/build/removeEmptyFiles",
"build:declarations": "rimraf dist-declarations && ts-node --max-old-space-size=8192 --transpile-only scripts/generation/main create-code-block-writer-file create-declaration-file",
"test": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" mocha --opts mocha.opts",
"test:debug": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" mocha --opts mocha.opts --inspect-brk",
"test:watch": "yarn test --watch-extensions ts --watch",
"test:ts-versions": "ts-node --transpileOnly scripts/test/testTypeScriptVersions",
"test:ts-versions": "ts-node --transpile-only scripts/test/testTypeScriptVersions",
"test:coverage": "cross-env TS_NODE_COMPILER=\"ttypescript\" TS_NODE_TRANSPILE_ONLY=\"true\" nyc --reporter=lcov mocha --opts mocha.opts",
"test:performance": "yarn build && node ./dist/tests/performance/run.js",
"test:performance-save": "yarn test:performance --save",
"type-check-library": "ts-node --transpileOnly scripts/typeCheckLibrary",
"type-check-library": "ts-node --transpile-only scripts/typeCheckLibrary",
"type-check-scripts": "tsc --noEmit --project tsconfig.scripts.json",
"code-generate": "ts-node --transpileOnly --compiler ttypescript scripts/generation/main",
"refactor": "ts-node --transpileOnly scripts/refactor",
"output-wrapped-nodes": "ts-node --transpileOnly scripts/generation/outputWrappedNodesInfo",
"code-generate": "ts-node --transpile-only --compiler ttypescript scripts/generation/main",
"refactor": "ts-node --transpile-only scripts/refactor",
"output-wrapped-nodes": "ts-node --transpile-only scripts/generation/outputWrappedNodesInfo",
"package": "yarn build && yarn build:declarations",
"publish-code-verification": "yarn code-verification && yarn ensure-no-declaration-file-errors && yarn ensure-declaration-files-not-changed",
"code-verification": "ts-node --transpileOnly scripts/verification/main ensure-structures-match-classes ensure-overload-structures-match ensure-array-inputs-readonly ensure-classes-implement-structure-methods ensure-mixin-not-applied-multiple-times validate-public-api-class-member-names validate-compiler-node-to-wrapped-type validate-code-fences",
"ensure-structures-match-classes": "ts-node --transpileOnly scripts/verification/main ensure-structures-match-classes",
"ensure-overload-structures-match": "ts-node --transpileOnly scripts/verification/main ensure-overload-structures-match",
"ensure-no-project-compile-errors": "ts-node --transpileOnly scripts/verification/ensureNoProjectCompileErrors",
"ensure-no-declaration-file-errors": "ts-node --transpileOnly scripts/verification/ensureNoDeclarationFileErrors",
"ensure-declaration-files-not-changed": "ts-node --transpileOnly scripts/verification/ensureDeclarationFilesNotChanged",
"ensure-array-inputs-readonly": "ts-node --transpileOnly scripts/verification/main ensure-array-inputs-readonly",
"ensure-or-throw-exists": "ts-node --transpileOnly scripts/verification/main ensure-or-throw-exists",
"code-verification": "ts-node --transpile-only scripts/verification/main ensure-structures-match-classes ensure-overload-structures-match ensure-array-inputs-readonly ensure-classes-implement-structure-methods ensure-mixin-not-applied-multiple-times validate-public-api-class-member-names validate-compiler-node-to-wrapped-type validate-code-fences",
"ensure-structures-match-classes": "ts-node --transpile-only scripts/verification/main ensure-structures-match-classes",
"ensure-overload-structures-match": "ts-node --transpile-only scripts/verification/main ensure-overload-structures-match",
"ensure-no-project-compile-errors": "ts-node --transpile-only scripts/verification/ensureNoProjectCompileErrors",
"ensure-no-declaration-file-errors": "ts-node --transpile-only scripts/verification/ensureNoDeclarationFileErrors",
"ensure-declaration-files-not-changed": "ts-node --transpile-only scripts/verification/ensureDeclarationFilesNotChanged",
"ensure-array-inputs-readonly": "ts-node --transpile-only scripts/verification/main ensure-array-inputs-readonly",
"ensure-or-throw-exists": "ts-node --transpile-only scripts/verification/main ensure-or-throw-exists",
"overwrite-declaration-files": "yarn build:declarations && shx cp -rf dist-declarations/ts-morph.d.ts lib/ts-morph.d.ts && shx cp -rf dist-declarations/code-block-writer.d.ts lib/code-block-writer.d.ts",
"type-check-docs": "ts-node --transpileOnly scripts/typeCheckDocumentation.ts",
"type-check-docs": "ts-node --transpile-only scripts/typeCheckDocumentation.ts",
"maintain-barrels": "barrel-maintainer src"
},
"repository": "git+https://github.com/dsherret/ts-morph.git",
Expand Down Expand Up @@ -75,43 +75,44 @@
"dependencies": {
"@dsherret/to-absolute-glob": "^2.0.2",
"code-block-writer": "9.4.0",
"fs-extra": "^7.0.0",
"glob-parent": "^3.1.0",
"globby": "^8.0.1",
"fs-extra": "^8.1.0",
"glob-parent": "^5.0.0",
"globby": "^10.0.1",
"is-negated-glob": "^1.0.0",
"multimatch": "^2.1.0",
"multimatch": "^4.0.0",
"typescript": "^3.0.1"
},
"devDependencies": {
"@types/chai": "^4.1.2",
"@types/diff": "^3.5.1",
"@types/fs-extra": "^5.0.2",
"@types/glob-parent": "^3.1.0",
"@types/globby": "^9.1.0",
"@types/chai": "^4.1.7",
"@types/diff": "^4.0.2",
"@types/fs-extra": "^8.0.0",
"@types/glob-parent": "^3.1.1",
"@types/is-negated-glob": "^1.0.0",
"@types/mocha": "^5.2.0",
"@types/multimatch": "^2.1.2",
"@types/node": "^6.0.110",
"@types/ts-nameof": "^2.0.0",
"barrel-maintainer": "^1.4.0",
"chai": "^4.1.2",
"chalk": "^2.4.0",
"conditional-type-checks": "^1.0.0",
"coveralls": "^3.0.1",
"cross-env": "^5.1.4",
"diff": "^3.5.0",
"mocha": "5.2.0",
"@types/mocha": "^5.2.7",
"@types/multimatch": "^2.1.3",
"@types/node": "^12.6.2",
"@types/ts-nameof": "^3.2.0",
"barrel-maintainer": "^1.5.0",
"chai": "^4.2.0",
"chalk": "^2.4.2",
"conditional-type-checks": "^1.0.1",
"coveralls": "^3.0.5",
"cross-env": "^5.2.0",
"diff": "^4.0.1",
"mocha": "6.1.4",
"npx": "^10.2.0",
"nyc": "12.0.2",
"rimraf": "^2.6.2",
"shelljs": "^0.8.2",
"nyc": "14.1.1",
"rimraf": "^2.6.3",
"shelljs": "^0.8.3",
"shx": "^0.3.2",
"source-map-support": "^0.5.5",
"ts-morph": "2.1.0",
"ts-nameof": "^3.1.0",
"ts-node": "7.0.0",
"tslint": "^5.11.0",
"ttypescript": "1.5.5",
"typescript": "3.5.2",
"source-map-support": "^0.5.12",
"ts-morph": "3.1.0",
"ts-nameof": "^3.2.0",
"ts-node": "8.3.0",
"tslint": "^5.18.0",
"ttypescript": "1.5.7",
"typescript": "3.5.3",
"typescript-3.0.1": "npm:typescript@3.0.1",
"typescript-3.0.3": "npm:typescript@3.0.3",
"typescript-3.1.6": "npm:typescript@3.1.6",
Expand Down
19 changes: 12 additions & 7 deletions src/tests/projectTests.ts
Expand Up @@ -835,19 +835,24 @@ describe(nameof(Project), () => {
});

describe("mixing real files with virtual files", () => {
const testFilesDirPath = path.join(__dirname, "../../src/tests/testFiles");
const project = new Project();
project.addExistingSourceFiles(`${testFilesDirPath}/**/*.ts`);
project.createSourceFile(
path.join(testFilesDirPath, "variableTestFile.ts"),
`import * as testClasses from "./testClasses";\n\nlet myVar = new testClasses.TestClass().name;\n`
);
function createProject() {
const testFilesDirPath = path.join(__dirname, "../../src/tests/testFiles").replace(/\\/g, "/");
const project = new Project();
project.addExistingSourceFiles(`${testFilesDirPath}/**/*.ts`);
project.createSourceFile(
path.join(testFilesDirPath, "variableTestFile.ts"),
`import * as testClasses from "./testClasses";\n\nlet myVar = new testClasses.TestClass().name;\n`
);
return project;
}

it("should have 4 source files", () => {
const project = createProject();
expect(project.getSourceFiles().length).to.equal(4);
});

it("should rename a name appropriately", () => {
const project = createProject();
const interfaceFile = project.getSourceFileOrThrow("testInterfaces.ts");
interfaceFile.getInterfaces()[0].getProperties()[0].rename("newName");
const variableFile = project.getSourceFileOrThrow("variableTestFile.ts");
Expand Down
10 changes: 0 additions & 10 deletions src/typings/globby.d.ts

This file was deleted.

0 comments on commit 07f3417

Please sign in to comment.