Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update yarn to latest version (4.4.0) #199

Merged
merged 27 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: corepack enable
- run: corepack enable ${{ matrix.os == 'windows-latest' && '--install-directory C:\npm\prefix' || '' }}

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -35,13 +35,18 @@ jobs:
cache: yarn
cache-dependency-path: "**/yarn.lock"

- run: yarn install --frozen-lockfiles
- run: yarn install

- run: yarn build

- name: Generate package archive
run: yarn pack

- name: Install dependencies for testing
run: yarn install --frozen-lockfiles
run: yarn install
working-directory: test
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: Test
working-directory: test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
cache-dependency-path: "**/yarn.lock"

- name: Install Packages
run: yarn install --frozen-lockfile
run: yarn install

- name: Build
run: yarn build
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ fabric.properties
# Editor-based Rest Client
.idea/httpRequests

test/out.tgz
package.tgz
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
"types": "types/index.d.ts",
"scripts": {
"compile": "tsc",
"build": "yarn run clean && yarn run compile",
"test": "yarn --cwd test test",
"build": "rm -rf dist && yarn run clean && yarn run compile",
"test": "yarn test/ install && yarn test/ add-package && yarn test/ test",
"release": "standard-version",
"--------------": "",
"format": "prettier --write .",
"clean": "rimraf -g dist \"**/*.tsbuildinfo\" ./test/projects/nx/dist",
"clean:all": "yarn run clean && rimraf -g node_modules \"**/node_modules\" \"**/yarn.lock\" yarn.lock",
"clean": "rm -rf dist \"**/*.tsbuildinfo\" ./test/projects/nx/dist",
"clean:all": "yarn run clean && rm -rf node_modules \"**/node_modules\" \"**/yarn.lock\" yarn.lock",
"reset": "yarn run clean:all && yarn install && yarn build",
"-------------- ": "",
"prepack": "yarn build",
"pretest": "yarn --cwd test install",
"prebuild": "rimraf -g dist"
"prepack": "yarn build"
},
"keywords": [
"typescript",
Expand Down Expand Up @@ -58,10 +56,9 @@
"@types/minimatch": "^5.1.2",
"@types/node": "^18.19.43",
"@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5",
"@types/ts-node": "npm:ts-node@^10.9.2",
"prettier": "^3.3.3",
"rimraf": "^5.0.10",
"standard-version": "^9.5.0",
"@types/ts-node": "npm:ts-node@^10.9.2",
"ts-patch": "^3.2.1",
"typescript": "^5.5.4"
},
Expand All @@ -71,5 +68,5 @@
"dependencies": {
"minimatch": "^3.1.2"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "yarn@4.4.0+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb"
}
18 changes: 7 additions & 11 deletions test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"license": "MIT",
"scripts": {
"test": "jest",
"prepare": "node prepare.js"
"g:ts-node": "cd $INIT_CWD && ts-node",
"add-package": "yarn ../ pack && yarn add ../package.tgz",
"postinstall": "node prepare.js"
},
"devDependencies": {
"@nrwl/cli": "^15.9.7",
Expand All @@ -23,15 +25,9 @@
"typescript": "^5.5.4",
"typescript-four-seven": "npm:typescript@4.7.4",
"typescript-three": "npm:typescript@3.6.5",
"typescript-transform-paths": "file:../"
"typescript-transform-paths": "../package.tgz"
},
"workspaces": {
"packages": [
"projects/*"
],
"nohoist": [
"**/semver/*",
"**/ts-patch/*"
]
}
"workspaces": [
"projects/*"
]
}
4 changes: 2 additions & 2 deletions test/tests/extras.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ describe(`Extra Tests`, () => {

describe(`ts-node register script`, () => {
test(`Works with --transpileOnly`, () => {
const res = execSync("yarn run --silent ts-node --transpileOnly src/index.ts", { cwd: projectRoot }).toString();
const res = execSync("yarn g:ts-node --transpileOnly src/index.ts", { cwd: projectRoot }).toString();
expect(stripAnsi(res)).toMatch(/^null($|\r?\n)/m);
});

test(`Works with --typeCheck`, () => {
const res = execSync("yarn run --silent ts-node --typeCheck src/index.ts", { cwd: projectRoot }).toString();
const res = execSync("yarn g:ts-node --typeCheck src/index.ts", { cwd: projectRoot }).toString();
expect(stripAnsi(res)).toMatch(/^null($|\r?\n)/);
});
});
Expand Down
Loading